version 1.204.2.7, 2004/09/29 05:45:34
|
version 1.204.2.8, 2004/11/06 01:22:11
|
Line 3219 sub displayPage {
|
Line 3219 sub displayPage {
|
|
|
sub displaySubByDates { |
sub displaySubByDates { |
my ($symb,$record,$parts,$responseType,$checkIcon,$uname,$udom) = @_; |
my ($symb,$record,$parts,$responseType,$checkIcon,$uname,$udom) = @_; |
|
my $isCODE=0; |
|
if (exists($record->{'resource.CODE'})) { $isCODE=1; } |
my $studentTable='<table border="0" width="100%"><tr><td bgcolor="#777777">'. |
my $studentTable='<table border="0" width="100%"><tr><td bgcolor="#777777">'. |
'<table border="0" width="100%"><tr bgcolor="#e6ffff">'. |
'<table border="0" width="100%"><tr bgcolor="#e6ffff">'. |
'<td><b>Date/Time</b></td>'. |
'<td><b>Date/Time</b></td>'. |
|
($isCODE?'<td><b>CODE</b></td>':''). |
'<td><b>Submission</b></td>'. |
'<td><b>Submission</b></td>'. |
'<td><b>Status </b></td></tr>'; |
'<td><b>Status </b></td></tr>'; |
my ($version); |
my ($version); |
Line 3234 sub displaySubByDates {
|
Line 3237 sub displaySubByDates {
|
for ($version=1;$version<=$$record{'version'};$version++) { |
for ($version=1;$version<=$$record{'version'};$version++) { |
my $timestamp = scalar(localtime($$record{$version.':timestamp'})); |
my $timestamp = scalar(localtime($$record{$version.':timestamp'})); |
$studentTable.='<tr bgcolor="#ffffff" valign="top"><td>'.$timestamp.'</td>'; |
$studentTable.='<tr bgcolor="#ffffff" valign="top"><td>'.$timestamp.'</td>'; |
|
if ($isCODE) { |
|
$studentTable.='<td>'.$record->{$version.':resource.CODE'}.'</td>'; |
|
} |
my @versionKeys = split(/\:/,$$record{$version.':keys'}); |
my @versionKeys = split(/\:/,$$record{$version.':keys'}); |
my @displaySub = (); |
my @displaySub = (); |
foreach my $partid (@{$parts}) { |
foreach my $partid (@{$parts}) { |
Line 4319 sub scantron_get_correction {
|
Line 4325 sub scantron_get_correction {
|
} elsif ($error eq 'duplicateCODE') { |
} elsif ($error eq 'duplicateCODE') { |
$r->print("</p><p>The encoded CODE has also been used by a previous paper ".join(', ',@{$arg}).", and CODEs are supposed to be unique</p>\n"); |
$r->print("</p><p>The encoded CODE has also been used by a previous paper ".join(', ',@{$arg}).", and CODEs are supposed to be unique</p>\n"); |
} |
} |
$r->print("<p>The CODE on the form is <tt>". |
$r->print("<p>The CODE on the form is <tt>'". |
$$scan_record{'scantron.CODE'}."</tt><br />\n"); |
$$scan_record{'scantron.CODE'}."'</tt><br />\n"); |
$r->print("<p>The ID on the form is <tt>". |
$r->print("<p>The ID on the form is <tt>". |
$$scan_record{'scantron.ID'}."</tt><br />\n"); |
$$scan_record{'scantron.ID'}."</tt><br />\n"); |
$r->print("The name on the paper is ". |
$r->print("The name on the paper is ". |
Line 4466 sub scantron_validate_CODE {
|
Line 4472 sub scantron_validate_CODE {
|
$scan_data); |
$scan_data); |
my $CODE=$$scan_record{'scantron.CODE'}; |
my $CODE=$$scan_record{'scantron.CODE'}; |
my $error=0; |
my $error=0; |
if (!exists($allcodes{$CODE}) && !$$scan_record{'scantron.useCODE'}) { |
if (!&Apache::lonnet::validCODE($CODE)) { |
|
&scantron_get_correction($r,$i,$scan_record, |
|
\%scantron_config, |
|
$line,'incorrectCODE',\%allcodes); |
|
return(1,$currentphase); |
|
} |
|
if (%allcodes && !exists($allcodes{$CODE}) |
|
&& !$$scan_record{'scantron.useCODE'}) { |
&scantron_get_correction($r,$i,$scan_record, |
&scantron_get_correction($r,$i,$scan_record, |
\%scantron_config, |
\%scantron_config, |
$line,'incorrectCODE',\%allcodes); |
$line,'incorrectCODE',\%allcodes); |
Line 4638 SCANTRONFORM
|
Line 4651 SCANTRONFORM
|
if (exists($scan_record->{'scantron.CODE'}) && |
if (exists($scan_record->{'scantron.CODE'}) && |
$scan_record->{'scantron.CODE'}) { |
$scan_record->{'scantron.CODE'}) { |
$form{'CODE'}=$scan_record->{'scantron.CODE'}; |
$form{'CODE'}=$scan_record->{'scantron.CODE'}; |
|
} else { |
|
$form{'CODE'}=''; |
} |
} |
my $result=&Apache::lonnet::ssi($resource->src(),%form); |
my $result=&Apache::lonnet::ssi($resource->src(),%form); |
if (&Apache::loncommon::connection_aborted($r)) { last; } |
if (&Apache::loncommon::connection_aborted($r)) { last; } |