Index: openacs-4/packages/evaluation/www/admin/groups/one-task.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/one-task.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/groups/one-task.tcl 28 Apr 2004 11:09:54 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/groups/one-task.tcl 22 May 2004 01:20:25 -0000 1.2
@@ -24,9 +24,20 @@
set page_title "Groups for task $task_name"
set context [list "Task Groups"]
+# we have to decide if we are going to show all the users in the system
+# or only the students of a given class (community in dotrln)
+# in order to create the groups
+
+set community_id [dotlrn_community::get_community_id]
+if { [empty_string_p $community_id] } {
+ set query_name students_without_group
+} else {
+ set query_name community_students_without_group
+}
+
set elements [list associate \
[list label "" \
- display_template { } \
+ display_template { } \
] \
student_name \
[list label "Name" \
@@ -38,13 +49,12 @@
link_html { title "Associate to group..." }] \
]
-
template::list::create \
-name students_without_group \
- -multirow students_without_group \
- -key student_id \
- -pass_properties { return_url student_id } \
- -filters { task_id {} } \
+ -multirow $query_name \
+ -key student_id \
+ -pass_properties { return_url student_id query_name } \
+ -filters { task_id {} } \
-elements $elements
@@ -54,7 +64,7 @@
set orderby " order by student_name asc"
}
-db_multirow -extend { associate_to_group_url associate_to_group } students_without_group get_students_without_group { *SQL* } {
+db_multirow -extend { associate_to_group_url associate_to_group } $query_name get_$query_name { *SQL* } {
set associate_to_group_url [export_vars -base "group-member-add" -url { task_id student_id }]
set associate_to_group "Associate to group..."
}