version 1.223, 2004/11/02 20:48:02
|
version 1.226, 2004/11/13 09:42:38
|
Line 3196 sub displayPage {
|
Line 3196 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 3211 sub displaySubByDates {
|
Line 3214 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 3468 sub scantron_CODElist {
|
Line 3474 sub scantron_CODElist {
|
my $cnum = $ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
my $cnum = $ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
my @names=&Apache::lonnet::getkeys('CODEs',$cdom,$cnum); |
my @names=&Apache::lonnet::getkeys('CODEs',$cdom,$cnum); |
my $namechoice='<option></option>'; |
my $namechoice='<option></option>'; |
foreach my $name (sort(@names)) { |
foreach my $name (sort {uc($a) cmp uc($b)} @names) { |
if ($name =~ /^error: 2 /) { next; } |
if ($name =~ /^error: 2 /) { next; } |
$namechoice.='<option value="'.$name.'">'.$name.'</option>'; |
$namechoice.='<option value="'.$name.'">'.$name.'</option>'; |
} |
} |
Line 3505 sub scantron_selectphase {
|
Line 3511 sub scantron_selectphase {
|
$result.= <<SCANTRONFORM; |
$result.= <<SCANTRONFORM; |
<table width="100%" border="0"> |
<table width="100%" border="0"> |
<tr> |
<tr> |
|
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="scantron_process"> |
<td bgcolor="#777777"> |
<td bgcolor="#777777"> |
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="scantron_process"> |
|
<input type="hidden" name="command" value="scantron_warning" /> |
<input type="hidden" name="command" value="scantron_warning" /> |
$default_form_data |
$default_form_data |
<table width="100%" border="0"> |
<table width="100%" border="0"> |
Line 3543 sub scantron_selectphase {
|
Line 3549 sub scantron_selectphase {
|
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
</form> |
</td> |
</td> |
</form> |
</tr> |
</tr> |
SCANTRONFORM |
SCANTRONFORM |
|
|
Line 3600 SCANTRONFORM
|
Line 3606 SCANTRONFORM
|
} |
} |
$r->print(<<SCANTRONFORM); |
$r->print(<<SCANTRONFORM); |
<tr> |
<tr> |
<td bgcolor="#777777"> |
<form action='/adm/grades' name='scantron_download'> |
<form action='/adm/grades' name='scantron_download'> |
<td bgcolor="#777777"> |
<input type="hidden" name="command" value="scantron_download" /> |
<input type="hidden" name="command" value="scantron_download" /> |
<table width="100%" border="0"> |
<table width="100%" border="0"> |
<tr bgcolor="#e6ffff"> |
<tr bgcolor="#e6ffff"> |
Line 3618 SCANTRONFORM
|
Line 3624 SCANTRONFORM
|
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
</form> |
</td> |
</td> |
</form> |
</tr> |
</tr> |
SCANTRONFORM |
SCANTRONFORM |
|
|
$r->print(<<SCANTRONFORM); |
$r->print(<<SCANTRONFORM); |
</table> |
</table> |
</form> |
|
$grading_menu_button |
$grading_menu_button |
SCANTRONFORM |
SCANTRONFORM |
|
|
Line 4295 sub scantron_get_correction {
|
Line 4300 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 4442 sub scantron_validate_CODE {
|
Line 4447 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 (!&Apache::lonnet::validCODE($CODE)) { |
|
&scantron_get_correction($r,$i,$scan_record, |
|
\%scantron_config, |
|
$line,'incorrectCODE',\%allcodes); |
|
return(1,$currentphase); |
|
} |
if (%allcodes && !exists($allcodes{$CODE}) |
if (%allcodes && !exists($allcodes{$CODE}) |
&& !$$scan_record{'scantron.useCODE'}) { |
&& !$$scan_record{'scantron.useCODE'}) { |
&scantron_get_correction($r,$i,$scan_record, |
&scantron_get_correction($r,$i,$scan_record, |
Line 4615 SCANTRONFORM
|
Line 4626 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; } |