| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Grades.pm,v 1.19 2005/10/08 22:13:26 sh002i Exp $ |
4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Grades.pm,v 1.20 2005/12/18 22:37:12 sh002i Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 208 | my $courseName = $ce->{courseName}; |
208 | my $courseName = $ce->{courseName}; |
| 209 | my $studentRecord = $db->getUser($studentName); # checked |
209 | my $studentRecord = $db->getUser($studentName); # checked |
| 210 | die "record for user $studentName not found" unless $studentRecord; |
210 | die "record for user $studentName not found" unless $studentRecord; |
| 211 | my $root = $ce->{webworkURLs}->{root}; |
211 | my $root = $ce->{webworkURLs}->{root}; |
| 212 | |
212 | |
|
|
213 | # listUserSets() excludes versioned sets, which we probably want to |
|
|
214 | # list here, so we also get the versioned sets |
| 213 | my @setIDs = sort $db->listUserSets($studentName); |
215 | my @setIDs = sort(( $db->listUserSets($studentName), |
|
|
216 | $db->listUserSetVersions($studentName) )); |
|
|
217 | |
| 214 | my $fullName = join("", $studentRecord->first_name," ", $studentRecord->last_name); |
218 | my $fullName = join("", $studentRecord->first_name," ", $studentRecord->last_name); |
| 215 | my $effectiveUser = $studentRecord->user_id(); |
219 | my $effectiveUser = $studentRecord->user_id(); |
| 216 | my $act_as_student_url = "$root/$courseName/?user=".$r->param("user"). |
220 | my $act_as_student_url = "$root/$courseName/?user=".$r->param("user"). |
| 217 | "&effectiveUser=$effectiveUser&key=".$r->param("key"); |
221 | "&effectiveUser=$effectiveUser&key=".$r->param("key"); |
| 218 | |
222 | |