[system] / trunk / webwork-modperl / lib / WeBWorK / ContentGenerator / Instructor / Scoring.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1416 Revision 1427
14 14
15use strict; 15use strict;
16use warnings; 16use warnings;
17use CGI qw(); 17use CGI qw();
18use WeBWorK::Utils qw(readFile formatDateTime); 18use WeBWorK::Utils qw(readFile formatDateTime);
19use WeBWorK::Timing;
19 20
20sub initialize { 21sub initialize {
21 my ($self) = @_; 22 my ($self) = @_;
22 my $r = $self->{r}; 23 my $r = $self->{r};
23 my $ce = $self->{ce}; 24 my $ce = $self->{ce};
29 my @scoringData = $self->scoreSet($setID); 30 my @scoringData = $self->scoreSet($setID);
30 $self->writeCSV("$scoringDir/s${setID}scr.csv", @scoringData); 31 $self->writeCSV("$scoringDir/s${setID}scr.csv", @scoringData);
31 } 32 }
32 } 33 }
33} 34}
34
35 35
36# If, some day, it becomes possible to assign a different number of problems to each student, this code 36# If, some day, it becomes possible to assign a different number of problems to each student, this code
37# will have to be rewritten some. 37# will have to be rewritten some.
38# $format can be any of "normal", "full", "info", or "totals". An undefined value defaults to "normal" 38# $format can be any of "normal", "full", "info", or "totals". An undefined value defaults to "normal"
39# normal: student info, the status of each problem in the set, and a "totals" column 39# normal: student info, the status of each problem in the set, and a "totals" column
59 59
60 # Initialize a two-dimensional array of the proper size 60 # Initialize a two-dimensional array of the proper size
61 for (my $i = 0; $i < keys(%users) + 7; $i++) { # 7 is how many descriptive fields there are in each column 61 for (my $i = 0; $i < keys(%users) + 7; $i++) { # 7 is how many descriptive fields there are in each column
62 push @scoringData, []; 62 push @scoringData, [];
63 } 63 }
64
65 64
66 unless ($format eq "totals") { 65 unless ($format eq "totals") {
67 $scoringData[0][0] = "NO OF FIELDS"; 66 $scoringData[0][0] = "NO OF FIELDS";
68 $scoringData[1][0] = "SET NAME"; 67 $scoringData[1][0] = "SET NAME";
69 $scoringData[2][0] = "PROB NUMBER"; 68 $scoringData[2][0] = "PROB NUMBER";

Legend:
Removed from v.1416  
changed lines
  Added in v.1427

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9