Index: openacs-4/packages/lab-report-central/www/attach-student.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/Attic/attach-student.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report-central/www/attach-student.tcl 30 Apr 2006 12:01:31 -0000 1.1 +++ openacs-4/packages/lab-report-central/www/attach-student.tcl 31 Aug 2006 10:32:07 -0000 1.2 @@ -19,7 +19,7 @@ -privilege lab_report_central_admin if { ![info exists return_url] } { - set return_url [export_vars -url -base lab {lab_id}] + set return_url [export_vars -url -base students {lab_id}] } set lab_name [db_string lab_name {} -default ""] Index: openacs-4/packages/lab-report-central/www/detach-student.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/detach-student.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report-central/www/detach-student.tcl 30 Apr 2006 12:01:31 -0000 1.1 +++ openacs-4/packages/lab-report-central/www/detach-student.tcl 31 Aug 2006 10:32:07 -0000 1.2 @@ -17,7 +17,7 @@ -privilege lab_report_central_admin if { ![info exists return_url] } { - set return_url [export_vars -url -base lab {lab_id}] + set return_url [export_vars -url -base students {lab_id}] } db_transaction { Index: openacs-4/packages/lab-report-central/www/group-add-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-add-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-add-postgresql.xql 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.4 + + + + INSERT INTO lrc_marker_group_map (group_id, marker_id, lab_id) + VALUES (:group_id, :marker_id, :lab_id) + + + + Index: openacs-4/packages/lab-report-central/www/group-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-add.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,28 @@ +ad_page_contract { + + Maps the specified marker to a newly created group with the given + group name. + + @author Nick Carroll (ncarroll@ee.usyd.edu.au) + @creation-date 2005-01-02 + @version $Id: group-add.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ + +} { + group_name:notnull,trim + marker_id:integer,notnull + lab_id:integer,notnull +} + +db_transaction { + # Create group with given group_name. + set group_id [group::new -group_name $group_name group] + + # Add marker to group. + #group::add_member -group_id $group_id -user_id $marker_id + + # Use group_id from above and insert with marker_id into + # lrc_marker_group_map. + db_dml insert_group_marker_ids {} +} + +ad_returnredirect [export_vars -url -base groups {lab_id}] Index: openacs-4/packages/lab-report-central/www/group-del-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-del-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-del-postgresql.xql 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,12 @@ + + + + postgresql7.4 + + + + DELETE FROM lrc_marker_group_map WHERE group_id = :group_id + + + + Index: openacs-4/packages/lab-report-central/www/group-del.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-del.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-del.adp 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,5 @@ + + #lab-report-central.delete_group# + @context;noquote@ + + Index: openacs-4/packages/lab-report-central/www/group-del.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-del.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-del.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + + Deletes the group matching the specified group_id. + + @author Nick Carroll (ncarroll@ee.usyd.edu.au) + @creation-date 2005-01-02 + @version $Id: group-del.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ + +} { + group_id:integer,notnull + lab_id:integer,notnull +} + +set context [list [list [export_vars -url -base lab {lab_id}] [lab_report_central::lab_name -lab_id $lab_id]] [list [export_vars -url -base groups {lab_id}] [_ lab-report-central.groups]] [_ lab-report-central.delete_group]] + +ad_form \ + -name del_group \ + -cancel_url "[export_vars -url -base groups {lab_id}]" \ + -export { group_id lab_id } \ + -form { + {prompt:text(inform) {label "[_ lab-report-central.confirm]"} {value "[_ lab-report-central.continue_with_delete_group]"}} + } \ + -on_submit { + db_transaction { + # Delete entry from lrc_marker_group_map. + db_dml delete_group {} + + # Delete group. + group::delete $group_id + } + } \ + -after_submit { + ad_returnredirect [export_vars -url -base groups {lab_id}] + } Index: openacs-4/packages/lab-report-central/www/group-members-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members-add.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,22 @@ +ad_page_contract { + + Adds the given list of users to the specified group. + + @author Nick Carroll (ncarroll@ee.usyd.edu.au) + @creation-date 2005-01-02 + @version $Id: group-members-add.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ + +} { + group_id:integer,notnull + lab_id:integer,notnull + user_id:integer,multiple +} + +set count 0 +# For each member in the list of user IDs, add that user to the group. +foreach user $user_id { + group::add_member -group_id $group_id -user_id $user + incr count +} + +ad_returnredirect -message "Added $count users to group" [export_vars -url -base {group-members} {group_id lab_id}] Index: openacs-4/packages/lab-report-central/www/group-members-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members-postgresql.xql 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,35 @@ + + + + postgresql7.4 + + + + SELECT group_name + FROM groups + WHERE group_id = :group_id + + + + + + SELECT d.last_name || ', ' || d.first_names AS name, d.user_id + FROM cc_users d, group_member_map g + WHERE g.group_id = :group_id AND g.member_id = d.user_id + ORDER BY name ASC + + + + + + SELECT d.last_name || ', ' || d.first_names AS name, d.user_id + FROM cc_users d LEFT OUTER JOIN group_member_map g + ON g.member_id = d.user_id + WHERE g.member_id NOT IN (SELECT member_id + FROM group_member_map WHERE group_id = :group_id) + GROUP BY d.user_id, d.last_name, d.first_names + ORDER BY name ASC + + + + Index: openacs-4/packages/lab-report-central/www/group-members-rem-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members-rem-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members-rem-2.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,22 @@ +ad_page_contract { + + Removes the given list of users to the specified group. + + @author Nick Carroll (ncarroll@ee.usyd.edu.au) + @creation-date 2005-01-02 + @version $Id: group-members-rem-2.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ + +} { + group_id:integer,notnull + lab_id:integer,notnull + user_id:integer,multiple +} + +set count 0 +# For each member in the list of user IDs, add that user to the group. +foreach user $user_id { + group::remove_member -group_id $group_id -user_id $user + incr count +} + +ad_returnredirect -message "Removed $count users from group" [export_vars -url -base {group-members} {group_id lab_id}] Index: openacs-4/packages/lab-report-central/www/group-members-rem.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members-rem.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members-rem.adp 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,9 @@ + +@title@ +@context;noquote@ + + +
+#lab-report-central.remove_members_are_you_sure#

+#acs-kernel.common_Yes# +#acs-kernel.common_no# Index: openacs-4/packages/lab-report-central/www/group-members-rem.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members-rem.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members-rem.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,39 @@ +ad_page_contract { + + Removes the given list of users to the specified group. + + @author Nick Carroll + @creation-date 2005-09-30 + @arch-tag: c144d674-1dab-49d0-8fc4-3bb1cf24b533 + @cvs-id $Id: group-members-rem.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ +} { + group_id:integer,notnull + lab_id:integer,notnull + user_id:integer,multiple +} + +set title "[_ lab-report-central.remove_members]" +set context [list [list [export_vars -url -base lab {lab_id}] [lab_report_central::lab_name -lab_id $lab_id]] [list [export_vars -url -base groups {lab_id}] [_ lab-report-central.groups]] $title] + +set user_id_list [split $user_id] + +template::list::create \ + -name members \ + -multirow members \ + -elements { + first_names { + label "[_ acs-kernel.First_Names]" + } + last_name { + label "[_ acs-kernel.Last_Name]" + } + email { + label "[_ acs-kernel.Email_Address]" + } + } + +db_multirow members members {} + +set group_name [group::get_element -group_id $group_id -element group_name] +set remove_url [export_vars -base group-members-rem-2 {group_id lab_id {user_id:multiple $user_id_list}}] +set cancel_url [export_vars -base group-members {group_id lab_id}] Index: openacs-4/packages/lab-report-central/www/group-members-rem.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members-rem.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members-rem.xql 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + + + select first_names, last_name, email + from cc_users + where user_id in ([join $user_id_list ,]) + + + + Index: openacs-4/packages/lab-report-central/www/group-members.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members.adp 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,33 @@ +<% +# +# Copyright (C) 2005 WEG +# +# This file is part of dotFOLIO. +# +# dotFOLIO is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# dotFOLIO is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +%> + + +#lab-report-central.group_members_admin# +@context;noquote@ + +#lab-report-central.members_of_group# +
+ +
+
+

+#lab-report-central.non_members_that_can_be_added# + +

+ +
Index: openacs-4/packages/lab-report-central/www/group-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/group-members.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/group-members.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,58 @@ +ad_page_contract { + + Displays members for a given group ID. + + @author Nick Carroll (ncarroll@ee.usyd.edu.au) + @creation-date 2005-01-02 + @version $Id: group-members.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ + +} { + group_id:integer,notnull + lab_id:integer,notnull +} + +set context "[list [list [export_vars -url -base lab {lab_id}] [lab_report_central::lab_name -lab_id $lab_id]] [list [export_vars -url -base groups {lab_id}] [_ lab-report-central.groups]] [_ lab-report-central.group_members]]" + +set group_name [lang::util::localize [db_string group_name {} -default ""]] + +db_multirow group_members group_members {} + +template::list::create \ + -name group_members \ + -multirow group_members \ + -key user_id \ + -bulk_actions { + "Remove" "group-members-rem" "Remove user from group" + } \ + -bulk_action_method post -bulk_action_export_vars { + user_id group_id lab_id + } \ + -no_data {#lab-report-central.no_members_added_to_group#} \ + -elements { + name { + label #lab-report-central.name# + } + } \ + -html {width 60%} + +db_multirow non_group_members non_group_members {} + +template::list::create \ + -name non_group_members \ + -multirow non_group_members \ + -key user_id \ + -bulk_actions { + "Add" "group-members-add" "Add user to group" + } \ + -bulk_action_method post -bulk_action_export_vars { + user_id group_id lab_id + } \ + -no_data {#lab-report-central.no_members_added_to_group#} \ + -elements { + name { + label #lab-report-central.name# + } + } \ + -html {width 60%} + +ad_return_template Index: openacs-4/packages/lab-report-central/www/groups-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/groups-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/groups-postgresql.xql 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,18 @@ + + + + postgresql7.4 + + + + SELECT groups.group_name, + cc_users.last_name || ', ' || + cc_users.first_names AS marker, groups.group_id + FROM groups, lrc_marker_group_map, cc_users + WHERE groups.group_id = lrc_marker_group_map.group_id + AND lrc_marker_group_map.marker_id = cc_users.user_id + ORDER BY groups.group_id ASC + + + + Index: openacs-4/packages/lab-report-central/www/groups.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/groups.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/groups.adp 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,25 @@ +<% +# +# Copyright (C) 2005 WEG +# +# This file is part of dotFOLIO. +# +# dotFOLIO is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# dotFOLIO is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +%> + + +#lab-report-central.groups# +@context;noquote@ + +
+ +
Index: openacs-4/packages/lab-report-central/www/groups.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/groups.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/groups.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,57 @@ +ad_page_contract { + + Displays a list of groups. Each group must have at least one + marker assigned to it. + + @author Nick Carroll (ncarroll@ee.usyd.edu.au) + @creation-date 2005-01-02 + @version $Id: groups.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ + +} { + lab_id +} + +set context [list [list [export_vars -url -base lab {lab_id}] [lab_report_central::lab_name -lab_id $lab_id]] [_ lab-report-central.groups]] + +db_multirow -extend {extra_form_part} groups select_groups {} { + set extra_form_part "#lab-report-central.delete#" +} + +template::list::create \ + -name groups \ + -multirow groups \ + -no_data [_ lab-report-central.no_groups_created] \ + -elements { + group_name { + label "#lab-report-central.group_name#" + display_template { + + @groups.group_name;noquote@ + + @groups.group_name;noquote@ + } + } + marker { + label "#lab-report-central.marker_pretty_name#" + display_template { + @groups.marker;noquote@ + } + } + extra_form_part { + display_template { + @groups.extra_form_part;noquote@ + } + } + } + +set new_group_form_part_name "

" + +append new_group_form_part_name "" + +set new_group_form_part_marker [lab_report_central::html_list_of_markers] +set new_group_form_part_button "

" + +template::multirow append groups $new_group_form_part_name \ + $new_group_form_part_marker "" $new_group_form_part_button + +ad_return_template Index: openacs-4/packages/lab-report-central/www/lab-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/lab-ae.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report-central/www/lab-ae.tcl 24 Apr 2006 11:27:04 -0000 1.1 +++ openacs-4/packages/lab-report-central/www/lab-ae.tcl 31 Aug 2006 10:32:07 -0000 1.2 @@ -33,8 +33,7 @@ {description:richtext(richtext),optional {label "[_ lab-report-central.description]" } {help_text "[_ lab-report-central.help_enter_lab_description]"} - {html {cols 48 rows 6}} - {htmlarea_p 0} + {html {cols 80 rows 12}} {nospell} } {instructor_id:search Index: openacs-4/packages/lab-report-central/www/lab-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/lab-postgresql.xql,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/lab-report-central/www/lab-postgresql.xql 24 Aug 2006 10:56:57 -0000 1.4 +++ openacs-4/packages/lab-report-central/www/lab-postgresql.xql 31 Aug 2006 10:32:07 -0000 1.5 @@ -6,6 +6,7 @@ SELECT name, description, person__name(instructor_id) AS instructor, + instructor_id, to_char(start_date, 'DD Month, YYYY') AS start_date, to_char(end_date, 'DD Month, YYYY') AS end_date FROM lrc_lab @@ -23,15 +24,21 @@ WHERE m.lab_id = :lab_id AND m.template_id = t.template_id AND t.package_id = :package_id + ORDER BY m.end_date ASC - + SELECT u.user_id AS student_id, u.first_names, u.last_name, u.email - FROM cc_users u, lrc_lab_student_map m - WHERE u.user_id = m.user_id - AND m.lab_id = :lab_id + FROM cc_users u, lrc_lab_student_map s, lrc_marker_group_map g, + group_member_map m + WHERE u.user_id = m.member_id + AND s.lab_id = :lab_id + AND g.lab_id = s.lab_id + AND g.marker_id = :user_id + AND g.group_id = m.group_id + Index: openacs-4/packages/lab-report-central/www/lab.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/lab.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/lab-report-central/www/lab.adp 24 Aug 2006 10:56:57 -0000 1.4 +++ openacs-4/packages/lab-report-central/www/lab.adp 31 Aug 2006 10:32:07 -0000 1.5 @@ -27,9 +27,10 @@ +

#lab-report-central.lab_report_templates#

- + @@ -40,10 +41,12 @@
  • @rt.template_name@ [Release: @rt.release_date@] [Submission: @rt.submission_date@] + #lab-report-central.view# - #lab-report-central.remove# + #lab-report-central.remove# +
  • @@ -54,19 +57,32 @@
    - -

    #lab-report-central.students#

    + +

    #lab-report-central.class_list#

    +
    + + +

    #lab-report-central.marking_group#

    +
    + + + +
    • @student.first_names@ @student.last_name@ (@student.email@) - #lab-report-central.remove# + #lab-report-central.view_reports#
    • Index: openacs-4/packages/lab-report-central/www/lab.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/lab.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/lab-report-central/www/lab.tcl 30 Apr 2006 12:01:31 -0000 1.4 +++ openacs-4/packages/lab-report-central/www/lab.tcl 31 Aug 2006 10:32:07 -0000 1.5 @@ -32,14 +32,32 @@ set create_url [export_vars -url -base attach-template { lab_id }] -set admin_p [permission::permission_p -party_id $user_id \ +set marker_p [permission::permission_p -party_id $user_id \ -object_id $package_id \ -privilege lab_report_central_admin] set add_student_url [export_vars -url -base attach-student {lab_id}] -db_multirow -extend {rem_student_url} student select_students {} { - set rem_student_url [export_vars -url -base detach-student {lab_id student_id}] +# Select all students that belong to the marker that is viewing this page. +db_multirow -extend {dotfolio_url} student select_marking_group {} { + set dotfolio_base_url "[dotfolio::user::dotfolio_url -user_id $student_id]" + set dotfolio_url [export_vars -url \ + -base "${dotfolio_base_url}pracs/view-lab" {lab_id}] } +set view_students_url [export_vars -url -base students {lab_id}] + +# Is the user the instructor that the lab is assigned to? +set lab_instructor_p 0 +if { $user_id == $instructor_id} { + set lab_instructor_p 1 +} + +set show_buttons_p 0 +if { $lab_instructor_p } { + set show_buttons_p 1 +} + +set create_group_url [export_vars -url -base groups {lab_id}] + ad_return_template Index: openacs-4/packages/lab-report-central/www/students-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/students-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/students-postgresql.xql 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,25 @@ + + + + postgresql7.4 + + + + SELECT name, description, person__name(instructor_id) AS instructor, + instructor_id, + to_char(start_date, 'DD Month, YYYY') AS start_date, + to_char(end_date, 'DD Month, YYYY') AS end_date + FROM lrc_lab + WHERE lab_id = :lab_id + + + + + + SELECT u.user_id AS student_id, u.first_names, u.last_name, u.email + FROM cc_users u, lrc_lab_student_map m + WHERE u.user_id = m.user_id + AND m.lab_id = :lab_id + + + Index: openacs-4/packages/lab-report-central/www/students.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/students.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/students.adp 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,36 @@ + +@page_title;noquote@ +@context;noquote@ +[#lab-report-central.admin#] + + + + + + +

      #lab-report-central.students#

      +
      + + + + + + + + + +
      • #lab-report-central.no_students_added#
      +
      +
      +
      Index: openacs-4/packages/lab-report-central/www/students.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/students.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lab-report-central/www/students.tcl 31 Aug 2006 10:32:07 -0000 1.1 @@ -0,0 +1,51 @@ +ad_page_contract { + Page for viewing details for a lab. + + @author Nick Carroll (nick.c@rroll.net) + @creation-date 2006-04-17 + @cvs-id $Id: students.tcl,v 1.1 2006/08/31 10:32:07 ncarroll Exp $ +} { + lab_id +} + +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] + +db_1row lab_details {} + +set page_title "$name - [_ lab-report-central.class_list]" +set context [list [list [export_vars -url -base lab {lab_id}] $name] [_ lab-report-central.class_list]] + +if { [info exists description] } { + set description [template::util::richtext::get_property html_value \ + $description] +} else { + set description "" +} + +set admin_p [permission::permission_p -party_id $user_id \ + -object_id $package_id \ + -privilege lab_report_central_admin] + +set add_student_url [export_vars -url -base attach-student {lab_id}] + +db_multirow -extend {rem_student_url dotfolio_url} student select_students {} { + set rem_student_url [export_vars -url -base detach-student {lab_id student_id}] + + set dotfolio_base_url "[dotfolio::user::dotfolio_url -user_id $student_id]" + set dotfolio_url [export_vars -url \ + -base "${dotfolio_base_url}pracs/view-lab" {lab_id}] +} + +# Is the user the instructor that the lab is assigned to? +set lab_instructor_p 0 +if { $user_id == $instructor_id} { + set lab_instructor_p 1 +} + +set show_buttons_p 0 +if { $lab_instructor_p } { + set show_buttons_p 1 +} + +ad_return_template Index: openacs-4/packages/lab-report-central/www/template-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report-central/www/template-ae.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report-central/www/template-ae.tcl 27 Apr 2006 04:34:34 -0000 1.1 +++ openacs-4/packages/lab-report-central/www/template-ae.tcl 31 Aug 2006 10:32:07 -0000 1.2 @@ -37,8 +37,7 @@ {description:richtext(richtext),optional {label "[_ lab-report-central.description]" } {help_text "[_ lab-report-central.help_enter_template_description]"} - {html {cols 48 rows 6}} - {htmlarea_p 0} + {html {cols 80 rows 12}} {nospell} } } -select_query {