--- loncom/homework/grades.pm 2005/06/04 19:02:19 1.272 +++ loncom/homework/grades.pm 2005/06/04 19:05:31 1.273 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.272 2005/06/04 19:02:19 albertel Exp $ +# $Id: grades.pm,v 1.273 2005/06/04 19:05:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4735,7 +4735,8 @@ sub scantron_get_correction { $r->print("
How should I handle this?
\n");
$r->print("\n
");
my $i=0;
- if ($error eq 'incorrectCODE') {
+ if ($error eq 'incorrectCODE'
+ && $$scan_record{'scantron.CODE'}=~/\S/ ) {
my ($max,$closest)=&scantron_get_closely_matching_CODEs($arg,$$scan_record{'scantron.CODE'});
foreach my $testcode (@{$closest}) {
my $checked='';
@@ -4745,9 +4746,11 @@ sub scantron_get_correction {
$i++;
}
}
- my $checked; if (!$i) { $checked=' checked="on" '; }
- $r->print("");
- $r->print("\n
");
+ if ($$scan_record{'scantron.CODE'}=~/\S/ ) {
+ my $checked; if (!$i) { $checked=' checked="on" '; }
+ $r->print("");
+ $r->print("\n
");
+ }
$r->print(<