--- loncom/homework/grades.pm 2004/05/04 14:17:18 1.194
+++ loncom/homework/grades.pm 2004/05/07 16:12:32 1.197
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.194 2004/05/04 14:17:18 albertel Exp $
+# $Id: grades.pm,v 1.197 2004/05/07 16:12:32 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2049,11 +2049,11 @@ sub saveHandGrade {
}
} elsif ($dropMenu eq 'reset status'
&& exists($record{'resource.'.$_.'.solved'})) { #don't bother if no old records -> no attempts
- $newrecord{'resource.'.$_.'.tries'} = 0;
- $newrecord{'resource.'.$_.'.solved'} = '';
- $newrecord{'resource.'.$_.'.award'} = '';
- $newrecord{'resource.'.$_.'.awarded'} = 0;
- $newrecord{'resource.'.$_.'.regrader'}="$ENV{'user.name'}:$ENV{'user.domain'}";
+ foreach my $key (keys (%record)) {
+ if ($key=~/^resource\.\Q$_\E\./) { $newrecord{$key} = ''; }
+ }
+ $newrecord{'resource.'.$_.'.regrader'}=
+ "$ENV{'user.name'}:$ENV{'user.domain'}";
} elsif ($dropMenu eq '') {
$pts = ($ENV{'form.GD_BOX'.$newflg.'_'.$_} ne '' ?
$ENV{'form.GD_BOX'.$newflg.'_'.$_} :
@@ -3108,7 +3108,7 @@ sub displayPage {
'
Prob. '.
' '.($ENV{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade ';
- my ($depth,$question) = (1,1);
+ my ($depth,$question,$prob) = (1,1,1);
$iterator->next(); # skip the first BEGIN_MAP
my $curRes = $iterator->next(); # for "current resource"
while ($depth > 0) {
@@ -3119,7 +3119,7 @@ sub displayPage {
my $parts = $curRes->parts();
my $title = $curRes->compTitle();
my $symbx = $curRes->symb();
- $studentTable.=''.$question.
+ $studentTable.=' '.$prob.
(scalar(@{$parts}) == 1 ? '' : ' ('.scalar(@{$parts}).' parts)').' ';
$studentTable.='';
if ($ENV{'form.vProb'} eq 'yes' ) {
@@ -3169,6 +3169,7 @@ sub displayPage {
$studentTable.=' '."\n";
$question++;
}
+ $prob++;
}
$studentTable.=' ';
@@ -3295,7 +3296,7 @@ sub updateGradeByPage {
$iterator->next(); # skip the first BEGIN_MAP
my $curRes = $iterator->next(); # for "current resource"
- my ($depth,$question,$changeflag)= (1,1,0);
+ my ($depth,$question,$prob,$changeflag)= (1,1,1,0);
while ($depth > 0) {
if($curRes == $iterator->BEGIN_MAP) { $depth++; }
if($curRes == $iterator->END_MAP) { $depth--; }
@@ -3304,7 +3305,7 @@ sub updateGradeByPage {
my $parts = $curRes->parts();
my $title = $curRes->compTitle();
my $symbx = $curRes->symb();
- $studentTable.=''.$question.
+ $studentTable.=' '.$prob.
(scalar(@{$parts}) == 1 ? '' : ' ('.scalar(@{$parts}).' parts)').' ';
$studentTable.=' '.$title.' ';
@@ -3365,6 +3366,7 @@ sub updateGradeByPage {
''.$displayPts[1].' '.
' ';
+ $prob++;
}
$curRes = $iterator->next();
}
@@ -4433,7 +4435,8 @@ SCANTRONFORM
my %completedstudents;
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Scantron Status',
- 'Scantron Progress',$scanlines->{'count'});
+ 'Scantron Progress',$scanlines->{'count'},
+ 'inline',undef,'scantronupload');
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,
'Processing first student');
my $start=&Time::HiRes::time();