Index: openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl 7 Mar 2002 06:49:10 -0000 1.2 +++ openacs-4/packages/dotlrn-portlet/tcl/dotlrn-members-portlet-procs.tcl 11 Mar 2002 23:06:26 -0000 1.3 @@ -25,7 +25,7 @@ ad_proc -public get_pretty_name { } { - return "Community Members" + return "Members" } ad_proc -public link { 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.1 -r1.2 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp 6 Mar 2002 23:21:16 -0000 1.1 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp 11 Mar 2002 23:06:26 -0000 1.2 @@ -1,7 +1,29 @@ +
+ + +

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.1 -r1.2 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl 6 Mar 2002 23:21:16 -0000 1.1 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl 11 Mar 2002 23:06:26 -0000 1.2 @@ -1,19 +1,36 @@ -ad_page_contract { - The display logic for the dotrn members portlet +# copied from dotlrn/www/members-chunk.tcl - @author Arjun Sanyal (arjun@openforce.net) - @cvs_id $Id$ +ad_page_contract { + @author yon (yon@milliped.com) + @creation-date Jan 08, 2002 + @version $Id$ +} -query { } -properties { - + users:multirow } array set config $cf -set community_id $config(community_id) -if {[dotlrn::user_can_read_private_data_p]} { - set member_data "FIXME: here's where the list of members will go

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 @@ +
- @staff_data@ +Professors: +

-

+

- @student_list_link@ +Teaching Assistants: +

- - -
-
+Course Assistants: + + + +
+ +FIXME: student list link 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.1 -r1.2 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl 6 Mar 2002 23:21:16 -0000 1.1 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.tcl 11 Mar 2002 23:06:26 -0000 1.2 @@ -1,24 +1,46 @@ -ad_page_contract { - The display logic for the dotrn "staff list" PE +# copied from dotlrn/www/members-chunk.tcl - @author Arjun Sanyal (arjun@openforce.net) - @cvs_id $Id$ +ad_page_contract { + @author yon (yon@milliped.com) + @creation-date Jan 08, 2002 + @version $Id$ +} -query { } -properties { - + users:multirow } array set config $cf -set community_id $config(community_id) -set staff_data "FIXME: here's where the staff data will go:

-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]"] + } } +