Index: openacs-4/packages/dotlrn/www/member-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add-3.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/member-add-3.tcl 24 Jul 2004 08:34:10 -0000 1.8 +++ openacs-4/packages/dotlrn/www/member-add-3.tcl 13 Jan 2005 13:57:21 -0000 1.9 @@ -22,26 +22,23 @@ @creation-date 2001-11-04 @version $Id$ } -query { - user_id + user_id:multiple rel_type {referer "one-community-admin"} } -#prevent this page from being called when it is not allowed -# i.e. AllowManageMembership 0 -dotlrn_portlet::is_allowed -parameter managemembership - set community_id [dotlrn_community::get_community_id] # See if the user is already in the group -set member_p [dotlrn_community::member_p $community_id $user_id] +foreach uid $user_id { + set member_p [dotlrn_community::member_p $community_id $uid] -if {$member_p} { - dotlrn_community::remove_user $community_id $user_id + if {$member_p} { + dotlrn_community::remove_user $community_id $uid + } + + + # Add the relation + dotlrn_community::add_user -rel_type $rel_type $community_id $uid } - - -# Add the relation -dotlrn_community::add_user -rel_type $rel_type $community_id $user_id - ad_returnredirect $referer