Index: openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl 16 Apr 2002 13:58:05 -0000 1.13 +++ openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl 6 May 2002 23:56:33 -0000 1.14 @@ -82,64 +82,56 @@ } { Add the static applet to a dotlrn community } { - set community_type \ - [dotlrn_community::get_community_type_from_community_id $community_id] + set community_type [dotlrn_community::get_community_type_from_community_id $community_id] - set pt_id [dotlrn_community::get_portal_template_id $community_id] + set portal_id [dotlrn_community::get_portal_id -community_id $community_id] - ns_log notice "aks7: $pt_id" - # If i'm in a class, add a portlet called "class (pn) info" # if I'm in a community, add a portlet called "community (pn) info" # or if I'm in a subcomm, "subcomm (pn) info" if {$community_type == "dotlrn_club"} { + set content_id [static_portal_content::new \ -instance_id $community_id \ -content " " \ -pretty_name "[dotlrn::parameter clubs_pretty_name] Info" ] - static_portal_content::add_to_portal \ - -content_id $content_id \ - -portal_id $pt_id + static_portal_content::add_to_portal -content_id $content_id -portal_id $portal_id } elseif {$community_type == "dotlrn_community"} { set content_id [static_portal_content::new \ - -instance_id $community_id \ - -content " " \ - -pretty_name "[dotlrn::parameter subcommunities_pretty_name] Info" + -instance_id $community_id \ + -content " " \ + -pretty_name "[dotlrn::parameter subcommunities_pretty_name] Info" ] - static_portal_content::add_to_portal \ - -content_id $content_id \ - -portal_id $pt_id + static_portal_content::add_to_portal -content_id $content_id -portal_id $portal_id + } else { + set content_id [static_portal_content::new \ - -instance_id $community_id \ - -content " " \ - -pretty_name "[dotlrn::parameter class_instances_pretty_name] Info" + -instance_id $community_id \ + -content " " \ + -pretty_name "[dotlrn::parameter class_instances_pretty_name] Info" ] - static_portal_content::add_to_portal \ - -content_id $content_id \ - -portal_id $pt_id + static_portal_content::add_to_portal -content_id $content_id -portal_id $portal_id + } if {[dotlrn_community::dummy_comm_p -community_id $community_id]} { return } # the non-member page gets the same static portlet - set n_p_id [dotlrn_community::get_community_non_members_portal_id $community_id] + set n_p_id [dotlrn_community::get_non_member_portal_id -community_id $community_id] - static_portal_content::add_to_portal \ - -content_id $content_id \ - -portal_id $n_p_id + static_portal_content::add_to_portal -content_id $content_id -portal_id $n_p_id # set up the DS for the admin page - set admin_portal_id \ - [dotlrn_community::get_community_admin_portal_id $community_id] + set admin_portal_id [dotlrn_community::get_admin_portal_id -community_id $community_id] static_admin_portlet::make_self_available $admin_portal_id static_admin_portlet::add_self_to_page $admin_portal_id $community_id @@ -151,8 +143,6 @@ } { remove the applet from the community } { - # Remove all instances of the static portlet! - # Killing the package } ad_proc -public add_user { @@ -165,31 +155,26 @@ } + ad_proc -public remove_user { + user_id + } { + } { + } ad_proc -public add_user_to_community { community_id user_id } { Add a user to a specific dotlrn community } { - # This needs to loop through all content items for this community - # and add them to the user's portlet - # FIXME } - ad_proc -public remove_user { - user_id - } { - } { - } - ad_proc -public remove_user_from_community { community_id user_id } { Remove a user from a community } { - # Remove all static_portlet instances from the user-community portal - # FIXME } + }