Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp 26 Mar 2002 21:30:41 -0000 1.5 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp 27 Mar 2002 22:17:20 -0000 1.6 @@ -10,7 +10,7 @@ (@users.email@) - <%= [dotlrn_community::get_role_pretty_name_from_rel_type -rel_type $users(rel_type)] %> + @users.role@ [deregister] Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl 26 Mar 2002 21:31:01 -0000 1.3 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl 27 Mar 2002 22:17:20 -0000 1.4 @@ -12,8 +12,8 @@ array set config $cf set user_id [ad_conn user_id] -set referer [ad_conn url] -set community_id [dotlrn_community::get_community_id] +set referer [ad_conn url] +set community_id $config(community_id) set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id $community_id] set read_private_data_p [dotlrn::user_can_read_private_data_p $user_id] @@ -22,5 +22,3 @@ template::util::list_of_ns_sets_to_multirow \ -rows [dotlrn_community::list_users $community_id] \ -var_name "users" - -ad_return_template Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 18 Mar 2002 17:58:44 -0000 1.5 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 27 Mar 2002 22:17:20 -0000 1.6 @@ -1,70 +1,64 @@ - -
+ Professors: - -

+

Teaching Assistants: -

+

+ Course Assistants: -

-
Student List -
+ Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl 12 Mar 2002 05:16:34 -0000 1.3 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl 27 Mar 2002 22:17:20 -0000 1.4 @@ -13,33 +13,32 @@ set user_id [ad_conn user_id] set referer [ad_conn url] -set community_id [dotlrn_community::get_community_id] +set community_id $config(community_id) set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id $community_id] set read_private_data_p [dotlrn::user_can_read_private_data_p $user_id] -# Get all users for this community, including role -set rel_types_list [dotlrn_community::get_allowed_rel_types -community_id $community_id] +# get all the users in a list of ns_sets +set all_users_list [dotlrn_community::list_users $community_id] -foreach rel_type $rel_types_list { - - set rel_pn [dotlrn_community::get_role_pretty_name_from_rel_type \ - -rel_type $rel_type] - - template::multirow create $rel_type rel_id rel_type user_id first_names last_name email member_link - - set list_of_users \ - [dotlrn_community::list_users_in_role \ - -rel_type $rel_type $community_id] - - foreach user $list_of_users { - template::multirow append $rel_type \ - [lindex $user 0] \ - $rel_pn \ - [lindex $user 2] \ - [lindex $user 3] \ - [lindex $user 4] \ - [lindex $user 5] \ - [acs_community_member_link -user_id [lindex $user 2] -label "[lindex $user 3] [lindex $user 4]"] +set n_profs 0 +set n_tas 0 +set n_cas 0 + +# count how many of some types +foreach one_user_set $all_users_list { + if {[string equal [ns_set get $one_user_set rel_type] "dotlrn_instructor_rel"]} { + incr n_profs + } elseif {[string equal [ns_set get $one_user_set rel_type] "dotlrn_ta_rel"]} { + incr n_tas + } elseif {[string equal [ns_set get $one_user_set rel_type] "dotlrn_ca_rel"]} { + incr n_cas } } + +# stuff into a multirow +template::util::list_of_ns_sets_to_multirow \ + -rows $all_users_list \ + -var_name "users" + +