Index: openacs-4/packages/dotlrn/www/members-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members-chunk.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/members-chunk.adp 22 Mar 2002 22:23:54 -0000 1.9 +++ openacs-4/packages/dotlrn/www/members-chunk.adp 26 Mar 2002 21:07:00 -0000 1.10 @@ -61,16 +61,43 @@ - +

Members of <%= [dotlrn_community::get_parent_name -community_id $community_id] %> That Are Not Members of <%= [dotlrn_community::get_community_name $community_id] %>

- NOT DONE YET! + + - + + + + + + + + + + + + + + + + +
  + + + + + + +
MemberAdministrator 
+
@formgroup.widget@@formgroup.label@
 
+
+
Index: openacs-4/packages/dotlrn/www/members-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members-chunk.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/members-chunk.tcl 22 Mar 2002 23:21:25 -0000 1.10 +++ openacs-4/packages/dotlrn/www/members-chunk.tcl 26 Mar 2002 21:07:00 -0000 1.11 @@ -5,8 +5,10 @@ @creation-date Jan 08, 2002 @version $Id$ } -query { + parent_user_role:multiple,array,optional } -properties { users:multirow + n_parent_users:onevalue } set user_id [ad_conn user_id] @@ -60,11 +62,36 @@ set subcomm_p [dotlrn_community::subcommunity_p -community_id $community_id] if {$subcomm_p} { - template::util::list_of_ns_sets_to_multirow \ - -rows [dotlrn_community::list_possible_subcomm_users -subcomm_id $community_id] \ - -var_name "parent_users" form create parent_users_form + + element create parent_users_form selected_users \ + -label " " \ + -datatype text \ + -widget checkbox \ + -optional + + set parent_user_list [dotlrn_community::list_possible_subcomm_users -subcomm_id $community_id] + set n_parent_users [llength $parent_user_list] + + if {[form is_valid parent_users_form]} { + set selected_users [element get_values parent_users_form selected_users] + + foreach selected_user $selected_users { + dotlrn_community::add_user -rel_type $parent_user_role($selected_user) $community_id $selected_user + } + + ad_returnredirect [ns_conn url] + } + + set selected_users_options [list] + + foreach user $parent_user_list { + lappend selected_users_options [list "
[ns_set get $user last_name], [ns_set get $user first_names] ([ns_set get $user email])
" [ns_set get $user user_id]] + } + + element set_properties parent_users_form selected_users -options $selected_users_options + } ad_return_template