--- loncom/homework/grades.pm 2003/10/14 00:05:16 1.130.2.1.2.9 +++ loncom/homework/grades.pm 2003/10/16 03:51:52 1.130.2.1.2.11 @@ -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.11 2003/10/16 03:51:52 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3145,13 +3145,24 @@ sub getSequenceDropDown { return $result; } +#FIXME, I am in loncreatecourse, use that one instead +sub propath { + my ($udom,$uname)=@_; + $udom=~s/\W//g; + $uname=~s/\W//g; + my $subdir=$uname.'__'; + $subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/; + my $proname="$Apache::lonnet::perlvar{'lonUsersDir'}/$udom/$subdir/$uname"; + return $proname; +} + sub scantron_uploads { if (!-e $Apache::lonnet::perlvar{'lonScansDir'}) { return ''}; my $result= ''); $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 +3614,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 +3669,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 +3685,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