[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 16 Aug 2006 18:06:40 -0000
albertel Wed Aug 16 14:06:40 2006 EDT
Modified files:
/loncom/homework grades.pm
Log:
- handle '*' as a doublebubble annotation
- in number mode '0' means 'J'
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.370 loncom/homework/grades.pm:1.371
--- loncom/homework/grades.pm:1.370 Fri Jul 14 17:11:20 2006
+++ loncom/homework/grades.pm Wed Aug 16 14:06:36 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.370 2006/07/14 21:11:20 www Exp $
+# $Id: grades.pm,v 1.371 2006/08/16 18:06:36 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4608,7 +4608,8 @@
substr($questions,0,$$scantron_config{'Qlength'})='';
if (length($currentquest) < $$scantron_config{'Qlength'}) { next; }
if ($$scantron_config{'Qon'} eq 'letter') {
- if ($currentquest eq '?') {
+ if ($currentquest eq '?'
+ || $currentquest eq '*') {
push(@{$record{'scantron.doubleerror'}},$questnum);
$record{"scantron.$questnum.answer"}='';
} elsif (!$currentquest
@@ -4622,7 +4623,8 @@
$record{"scantron.$questnum.answer"}=$currentquest;
}
} elsif ($$scantron_config{'Qon'} eq 'number') {
- if ($currentquest eq '?') {
+ if ($currentquest eq '?'
+ || $currentquest eq '*') {
push(@{$record{'scantron.doubleerror'}},$questnum);
$record{"scantron.$questnum.answer"}='';
} elsif (!$currentquest
@@ -4633,8 +4635,14 @@
push(@{$record{"scantron.missingerror"}},$questnum);
}
} else {
- $record{"scantron.$questnum.answer"}=
- $alphabet[$currentquest-1];
+ # wrap zero back to J
+ if ($currentquest eq '0') {
+ $record{"scantron.$questnum.answer"}=
+ $alphabet[9];
+ } else {
+ $record{"scantron.$questnum.answer"}=
+ $alphabet[$currentquest-1];
+ }
}
} else {
my @array=split($$scantron_config{'Qon'},$currentquest,-1);