Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.136 -r1.137 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 29 May 2002 23:00:25 -0000 1.136 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 31 May 2002 06:42:16 -0000 1.137 @@ -698,7 +698,7 @@ } ad_proc -public add_user_to_community { - {-rel_type dotlrn_member_rel} + {-rel_type ""} {-community_id:required} {-user_id:required} {-member_state approved} @@ -707,10 +707,15 @@ Assigns a user to a particular role for that class. Roles in DOTLRN can be student, prof, ta, admin } { + if {[member_p $community_id $user_id]} { return } + if {[empty_string_p $rel_type]} { + set rel_type dotlrn_member_rel + } + db_transaction { # Create the form if {[empty_string_p $extra_vars]} { @@ -743,6 +748,7 @@ membership_approve -user_id $user_id -community_id $community_id } } + } ad_proc -public membership_approve {