| 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: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm,v 1.13 2003/12/12 02:24:30 gage Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm,v 1.14 2003/12/18 23:15:34 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. |
| … | |
… | |
| 195 | my @userRecords = $db->getUsers(@studentList); |
195 | my @userRecords = $db->getUsers(@studentList); |
| 196 | $WeBWorK::timer->continue("End obtaining user records for set $setName") if defined($WeBWorK::timer); |
196 | $WeBWorK::timer->continue("End obtaining user records for set $setName") if defined($WeBWorK::timer); |
| 197 | |
197 | |
| 198 | my @augmentedUserRecords = (); |
198 | my @augmentedUserRecords = (); |
| 199 | foreach my $studentRecord (@userRecords) { |
199 | foreach my $studentRecord (@userRecords) { |
|
|
200 | next unless ref($studentRecord); |
| 200 | my $student = $studentRecord->user_id; |
201 | my $student = $studentRecord->user_id; |
| 201 | next if $studentRecord->last_name =~/^practice/i; # don't show practice users |
202 | next if $studentRecord->last_name =~/^practice/i; # don't show practice users |
| 202 | next if $studentRecord->status !~/C/; # don't show dropped students FIXME |
203 | next if $studentRecord->status !~/C/; # don't show dropped students FIXME |
| 203 | my $status = 0; |
204 | my $status = 0; |
| 204 | my $attempted = 0; |
205 | my $attempted = 0; |
| … | |
… | |
| 214 | $WeBWorK::timer->continue("Begin obtaining problem records for user $student set $setName") if defined($WeBWorK::timer); |
215 | $WeBWorK::timer->continue("Begin obtaining problem records for user $student set $setName") if defined($WeBWorK::timer); |
| 215 | my @problemRecords = $db->getUserProblems( @triplets ); |
216 | my @problemRecords = $db->getUserProblems( @triplets ); |
| 216 | $WeBWorK::timer->continue("End obtaining problem records for user $student set $setName") if defined($WeBWorK::timer); |
217 | $WeBWorK::timer->continue("End obtaining problem records for user $student set $setName") if defined($WeBWorK::timer); |
| 217 | |
218 | |
| 218 | foreach my $problemRecord (@problemRecords) { |
219 | foreach my $problemRecord (@problemRecords) { |
|
|
220 | next unless ref($problemRecord); |
| 219 | my $prob = $problemRecord->problem_id; |
221 | my $prob = $problemRecord->problem_id; |
| 220 | #foreach my $prob (@problems) { |
222 | #foreach my $prob (@problems) { |
| 221 | #my $problemRecord = $db->getUserProblem($student, $setName, $prob); |
223 | #my $problemRecord = $db->getUserProblem($student, $setName, $prob); |
| 222 | $probNum++; |
224 | $probNum++; |
| 223 | my $valid_status = 0; |
225 | my $valid_status = 0; |