--- loncom/homework/grades.pm 2003/10/14 00:05:16 1.130.2.1.2.9 +++ loncom/homework/grades.pm 2003/10/14 22:52:24 1.130.2.1.2.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.130.2.1.2.9 2003/10/14 00:05:16 albertel Exp $ +# $Id: grades.pm,v 1.130.2.1.2.10 2003/10/14 22:52:24 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3362,7 +3362,6 @@ sub scantron_parse_scanline { $record{"scantron.$questnum.answer"}=$alphabet[length($array[0])]; } if (scalar(@array) gt 2) { - Apache->request->print("snippet is
$currentquest
"); push(@{$record{'scantron.doubleerror'}},$questnum); my @ans=@array; my $i=length($ans[0]);shift(@ans); @@ -3379,7 +3378,6 @@ sub scantron_parse_scanline { sub scantron_add_delay { my ($delayqueue,$scanline,$errormessage,$errorcode)=@_; - Apache->request->print('add_delay_error '.$_[2] ); push(@$delayqueue, {'line' => $scanline, 'emsg' => $errormessage, 'ecode' => $errorcode } @@ -3393,9 +3391,7 @@ sub scantron_find_student { return &scan_data($scan_data,"$line.user"); } foreach my $id (keys(%$idmap)) { - #Apache->request->print('
checking studnet -'.$id.'- againt -'.$scanID.'- 
'); if (lc($id) eq lc($scanID)) { - #Apache->request->print('success'); return $$idmap{$id}; } } @@ -3493,13 +3489,21 @@ SCANTRONFORM } } if (!$stop) { - $r->print("Validation process complete, click 'Submit' to start proccssing"); + $r->print("Validation process complete.
"); + $r->print(''); $r->print(''); } else { $r->print(''); $r->print(""); } - $r->print(''); + if ($stop) { + $r->print(''); + $r->print(' using corrected info
'); + $r->print(""); + $r->print(" this scanline saving it for later."); + } + $r->print("
".&show_grading_menu_form($symb,$url). + ""); return ''; } @@ -3599,20 +3603,13 @@ sub scantron_validate_ID { my %found=('ids'=>{},'usernames'=>{}); for (my $i=0;$i<=$scanlines->{'count'};$i++) { my $line=&scantron_get_line($scanlines,$i); - if (!$line) { next; } + if ($line=~/^[\s\cz]*$/) { next; } my $scan_record=&scantron_parse_scanline($line,$i,\%scantron_config, $scan_data); my $id=$$scan_record{'scantron.ID'}; -# $r->print("

Checking ID ".$$scan_record{'scantron.ID'}. -# " on paper ID ".$$scan_record{'scantron.PaperID'}."

\n"); my $found; foreach my $checkid (keys(%idmap)) { - if (lc($checkid) eq lc($id)) { - if ($checkid ne $id) { - #$r->print("

Using $checkid for encoded $id

\n"); - } - $found=$checkid;last; - } + if (lc($checkid) eq lc($id)) { $found=$checkid;last; } } if ($found) { my $username=$idmap{$found}; @@ -3661,12 +3658,12 @@ sub scantron_get_correction { #to show both the current line and the previous one and allow skipping #the previous one or the current one - $r->print("

This scantron record has an error ($error). "); + $r->print("

An error was detected ($error) "); if ( defined($$scan_record{'scantron.PaperID'}) ) { - $r->print("The current PaperID is ". + $r->print(" for PaperID ". $$scan_record{'scantron.PaperID'}." \n"); } else { - $r->print("The current scanline is

".
+	$r->print(" in scanline $i 
".
 		  $line."
\n"); } $r->print(''."\n"); @@ -3677,61 +3674,68 @@ sub scantron_get_correction { } elsif ($error eq 'duplicateID') { $r->print("The encoded ID has also been used by a previous paper $arg

\n"); } - $r->print("

Original ID is ".$$scan_record{'scantron.ID'}. - "
\n"); - $r->print("Name on paper is ".$$scan_record{'scantron.LastName'}.",". + $r->print("

The ID on the form is ". + $$scan_record{'scantron.ID'}."
\n"); + $r->print("The name on the paper is ". + $$scan_record{'scantron.LastName'}.",". $$scan_record{'scantron.FirstName'}."

"); - $r->print("

Please correct
\n"); - $r->print("\n