role, first name, last name, email
-List of Members"
-} else {
- set member_data ""
+set user_id [ad_conn user_id]
+set referer [ad_conn url]
+set community_id [dotlrn_community::get_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 list_of_users [dotlrn_community::list_users $community_id]
+
+template::multirow create users rel_id rel_type user_id first_names last_name email
+
+foreach user $list_of_users {
+ template::multirow append users \
+ [lindex $user 0] \
+ [dotlrn_community::get_role_pretty_name_from_rel_type -rel_type [lindex $user 1]] \
+ [lindex $user 2] \
+ [lindex $user 3] \
+ [lindex $user 4] \
+ [lindex $user 5]
}
+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.1 -r1.2
--- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 6 Mar 2002 23:21:16 -0000 1.1
+++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 11 Mar 2002 23:06:26 -0000 1.2
@@ -1,12 +1,68 @@
+
- @student_list_link@
+Teaching Assistants:
+
- @staff_data@
+Professors:
+
+
-
+
-
-
-profs
-ta's
-ca's
-" +set user_id [ad_conn user_id] +set referer [ad_conn url] +set community_id [dotlrn_community::get_community_id] -if {[dotlrn::user_can_read_private_data_p]} { - set student_list_link "show student list
-
List of Members" -} else { - set student_list_link "" +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] + +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]"] + } } +