--- loncom/homework/grades.pm 2007/01/04 14:59:57 1.386
+++ loncom/homework/grades.pm 2007/03/13 18:59:56 1.391
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.386 2007/01/04 14:59:57 raeburn Exp $
+# $Id: grades.pm,v 1.391 2007/03/13 18:59:56 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -599,7 +599,8 @@ sub verifyreceipt {
my (undef,undef,$fullname) = &getclasslist('all','0');
my $receiptparts=0;
- if ($env{"course.$courseid.receiptalg"} eq 'receipt2') { $receiptparts=1; }
+ if ($env{"course.$courseid.receiptalg"} eq 'receipt2' ||
+ $env{"course.$courseid.receiptalg"} eq 'receipt3') { $receiptparts=1; }
my $parts=['0'];
if ($receiptparts) { ($parts)=&response_type($symb); }
foreach (sort
@@ -2125,6 +2126,9 @@ sub processHandGrade {
if ($encrypturl =~ /^yes$/i) {
$baseurl = &Apache::lonenc::encrypted($feedurl,1);
$showsymb = &Apache::lonenc::encrypted($symb,1);
+ } else {
+ $baseurl = $feedurl;
+ $showsymb = $symb;
}
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) {
$subject = $env{'form.msgsub'} if ($includemsg =~ /msgsub/);
@@ -2534,7 +2538,7 @@ sub handback_files {
$message .= ' The returned file(s) are named: '. $file_msg;
$message .= " and can be found in your portfolio space.";
my $url = (&Apache::lonnet::decode_symb($symb))[2];
- my $feedurl = &Apache::lonnet::declutter($url);
+ my $feedurl = &Apache::lonnet::clutter($url);
my $encrypturl=&Apache::lonnet::EXT('resource.0.encrypturl',
$symb,$domain,$stuname);
my ($baseurl,$showsymb);
@@ -2981,7 +2985,7 @@ sub viewgrades {
}
$result.=''.''.''."\n".
'';
- $result.='';
#table listing all the students in a section/class
@@ -4635,6 +4639,7 @@ sub scantron_fixup_scanline {
$answer=$alphabet[$args->{'response'}];
} elsif ($on eq 'number') {
$answer=$args->{'response'}+1;
+ if ($answer == 10) { $answer = '0'; }
} else {
substr($answer,$args->{'response'},1)=$on;
}
@@ -4705,7 +4710,7 @@ sub scantron_parse_scanline {
|| $currentquest eq '*') {
push(@{$record{'scantron.doubleerror'}},$questnum);
$record{"scantron.$questnum.answer"}='';
- } elsif (!$currentquest
+ } elsif (!defined($currentquest)
|| $currentquest eq $$scantron_config{'Qoff'}
|| $currentquest !~ /^[A-Z]$/) {
$record{"scantron.$questnum.answer"}='';
@@ -4720,9 +4725,9 @@ sub scantron_parse_scanline {
|| $currentquest eq '*') {
push(@{$record{'scantron.doubleerror'}},$questnum);
$record{"scantron.$questnum.answer"}='';
- } elsif (!$currentquest
- || $currentquest eq $$scantron_config{'Qoff'}
- || $currentquest !~ /^\d$/) {
+ } elsif (!defined($currentquest)
+ || $currentquest eq $$scantron_config{'Qoff'}
+ || $currentquest !~ /^\d$/) {
$record{"scantron.$questnum.answer"}='';
if (!&scan_data($scan_data,"$whichline.no_bubble.$questnum")) {
push(@{$record{"scantron.missingerror"}},$questnum);