Index: openacs-4/packages/dotlrn-syllabus/tcl/syllabus-admin-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/tcl/syllabus-admin-portlet-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-syllabus/tcl/syllabus-admin-portlet-procs.tcl 27 Apr 2002 17:20:15 -0000 1.1 +++ openacs-4/packages/dotlrn-syllabus/tcl/syllabus-admin-portlet-procs.tcl 9 May 2002 23:59:53 -0000 1.2 @@ -14,11 +14,9 @@ # details. # -# dotlrn-syllabus/tcl/syllabus-portlet-procs.tcl - ad_library { - Procedures to support the syllabus module portlet + Procedures to support the syllabus admin portlet. @author arjun (arjun@openforce.net) @creation-date 2002-02-24 @@ -33,88 +31,45 @@ return "dotlrn-syllabus" } - ad_proc -private my_name { + ad_proc -private get_my_name { } { return "syllabus_admin_portlet" } ad_proc -public get_pretty_name { } { - return "Syllabus" + return "Syllabus Administration" } - ad_proc -public link { - } { - return - } - ad_proc -public add_self_to_page { - {-page_id ""} portal_id - community_id } { - Adds a syllabus portlet element to the specified page. + Adds a syllabus admin portlet element to the specified portal } { - return [portal::add_element_or_append_id \ - -portal_id $portal_id \ - -portlet_name [my_name] \ - -value_id $community_id \ - -key "community_id" + return [portal::add_element \ + -portal_id $portal_id \ + -portlet_name [get_my_name] ] } ad_proc -public remove_self_from_page { portal_id - instance_id } { - Removes a syllabus portlet element from the specified page. + Removes a syllabus admin portlet element from the specified portal } { - portal::remove_element_or_remove_id \ + portal::remove_element \ -portal_id $portal_id \ - -portlet_name [my_name] + -portlet_name [get_my_name] } - ad_proc -public make_self_available { - portal_id - } { - Wrapper for the portal:: proc - - @param portal_id - } { - portal::make_datasource_available \ - $portal_id [portal::get_datasource_id [my_name]] - } - - ad_proc -public make_self_unavailable { - portal_id - } { - Wrapper for the portal:: proc - - @param portal_id - } { - portal::make_datasource_unavailable \ - $portal_id [portal::get_datasource_id [my_name]] - } - ad_proc -public show { cf } { - Display the portal element - - @param cf A config array as a list - - @return HTML string } { - # no return call required with the helper proc portal::show_proc_helper \ -template_src "syllabus-admin-portlet" \ -package_key [my_package_key] \ -config_list $cf } - ad_proc -public edit { - } { - return {} - } - }