--- loncom/homework/grades.pm 2004/03/19 03:58:06 1.182
+++ loncom/homework/grades.pm 2004/07/02 08:19:48 1.204
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.182 2004/03/19 03:58:06 albertel Exp $
+# $Id: grades.pm,v 1.204 2004/07/02 08:19:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -511,7 +511,7 @@ sub verifyreceipt {
my $request = shift;
my $courseid = $ENV{'request.course.id'};
- my $receipt = unpack("%32C*",$Apache::lonnet::perlvar{'lonHostID'}).'-'.
+ my $receipt = &Apache::lonnet::recprefix($courseid).'-'.
$ENV{'form.receipt'};
$receipt =~ s/[^\-\d]//g;
my $url = $ENV{'form.url'};
@@ -1669,7 +1669,9 @@ KEYWORDS
$partid.' ( ID '.$respid.
' ) ';
if ($record{"resource.$partid.$respid.uploadedurl"}) {
- $lastsubonly.=' File uploaded by student Like all files provided by users, this file may contain virusses
';
+ &Apache::lonnet::allowuploaded('/adm/grades',
+ $record{"resource.$partid.$respid.uploadedurl"});
+ $lastsubonly.=' File uploaded by student Like all files provided by users, this file may contain virusses
';
}
$lastsubonly.='Submitted Answer: '.
&cleanRecord($subval,$responsetype,$symb,$partid,
@@ -2049,11 +2051,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.'_'.$_} :
@@ -2596,7 +2598,7 @@ sub editgrades {
if ($noupdate) {
# my $numcols=(scalar(@partid)*(scalar(@parts)-1)*2)+3;
my $numcols=scalar(@partid)*4+2;
- $result .= '