Index: openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-applet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-applet-procs.tcl,v diff -u -r1.2 -r1.2.14.1 --- openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-applet-procs.tcl 30 Oct 2003 12:21:43 -0000 1.2 +++ openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-applet-procs.tcl 17 Jun 2008 15:57:46 -0000 1.2.14.1 @@ -63,6 +63,26 @@ ad_return_complaint 1 "[applet_key] remove_applet not implemented!" } + ad_proc -public add_portlet { + portal_id + } { + + Adds a porlet. + @param portal_id The page to add portlet. + } { + dotlrn_homework_portlet::add_portlet -portal_id $portal_id + } + + ad_proc -public remove_portlet { + {-portal_id:required} + } { + Remove portlet + @param portal_id The page from remove portlet. + } { + ad_return_complaint 1 "[applet_key] remove_portlet not implimented!" + } + + ad_proc -private create_homework_folder { -community_id:required -package_id:required Index: openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-portlet-procs.tcl,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-portlet-procs.tcl 8 Aug 2006 21:26:36 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-portlet-procs.tcl 17 Jun 2008 15:57:46 -0000 1.4.4.1 @@ -41,6 +41,45 @@ return "" } + ad_proc -public add_portlet { + {-portal_id:required} + } { + + Adds a porlet. + @param portal_id The page to add portlet. + } { + set args [ns_set create] + ns_set put $args package_id 0 + ns_set put $args page_name "" + ns_set put $args folder_id 0 + ns_set put $args param_action "overwrite" + + add_portlet_helper $portal_id $args + } + + + ad_proc -public remove_portlet { + {-portal_id:required} + } { + Remove portlet + @param portal_id The page from remove portlet. + } { + ad_return_complaint 1 "[applet_key] remove_portlet not implimented!" + } + + ad_proc -public add_portlet_helper { + portal_id + args + } { + This does the call to add portlet to the given portal. Params for the portlet are set by the callers. + } { + add_self_to_page -portal_id $portal_id \ + -page_name [ns_set get $args page_name] \ + -package_id [ns_set get $args package_id] \ + -folder_id [ns_set get $args folder_id] \ + -param_action [ns_set get $args param_action] + } + ad_proc -public add_self_to_page { {-portal_id:required} {-page_name ""}