version 1.187, 2004/04/22 22:57:53
|
version 1.189, 2004/04/24 08:35:10
|
Line 4118 sub scantron_get_correction {
|
Line 4118 sub scantron_get_correction {
|
$r->print("\n<br /> "); |
$r->print("\n<br /> "); |
$r->print("<input type='radio' name='scan_CODE_resolution' value='use_unfound' checked='on' /> Use the CODE <b><tt>".$$scan_record{'scantron.CODE'}."</tt></b> that is was on the paper, ignoring the error."); |
$r->print("<input type='radio' name='scan_CODE_resolution' value='use_unfound' checked='on' /> Use the CODE <b><tt>".$$scan_record{'scantron.CODE'}."</tt></b> that is was on the paper, ignoring the error."); |
$r->print("\n<br />"); |
$r->print("\n<br />"); |
|
$r->print(<<ENDSCRIPT); |
|
<script type="text/javascript"> |
|
function change_radio(field) { |
|
var slct=document.scantronupload.scan_CODE_resolution; |
|
var i; |
|
for (i=0;i<slct.length;i++) { |
|
if (slct[i].value==field) { slct[i].checked=true; } |
|
} |
|
} |
|
</script> |
|
ENDSCRIPT |
my $href="/adm/pickcode?". |
my $href="/adm/pickcode?". |
"form=".&Apache::lonnet::escape("scantronupload"). |
"form=".&Apache::lonnet::escape("scantronupload"). |
"&scantron_format=".&Apache::lonnet::escape($ENV{'form.scantron_format'}). |
"&scantron_format=".&Apache::lonnet::escape($ENV{'form.scantron_format'}). |
"&scantron_CODElist=".&Apache::lonnet::escape($ENV{'form.scantron_CODElist'}). |
"&scantron_CODElist=".&Apache::lonnet::escape($ENV{'form.scantron_CODElist'}). |
"&curCODE=".&Apache::lonnet::escape($$scan_record{'scantron.CODE'}). |
"&curCODE=".&Apache::lonnet::escape($$scan_record{'scantron.CODE'}). |
"&scantron_selectfile=".&Apache::lonnet::escape($ENV{'form.scantron_selectfile'}); |
"&scantron_selectfile=".&Apache::lonnet::escape($ENV{'form.scantron_selectfile'}); |
$r->print("<input type='radio' name='scan_CODE_resolution' value='use_found' /> <a target='_blank' href='$href'>Select</a> a CODE from the list of all CODEs and use it. Selected CODE is <input type='text' size='8' name='scan_CODE_selectedvalue' />"); |
$r->print("<input type='radio' name='scan_CODE_resolution' value='use_found' /> <a target='_blank' href='$href'>Select</a> a CODE from the list of all CODEs and use it. Selected CODE is <input readonly='true' type='text' size='8' name='scan_CODE_selectedvalue' onfocus=\"javascript:change_radio('use_found')\" onchange=\"javascript:change_radio('use_found')\" />"); |
$r->print("\n<br />"); |
$r->print("\n<br />"); |
$r->print("<input type='radio' name='scan_CODE_resolution' value='use_typed' /> Use <input type='text' size='8' name='scan_CODE_newvalue' /> as the CODE."); |
$r->print("<input type='radio' name='scan_CODE_resolution' value='use_typed' /> Use <input type='text' size='8' name='scan_CODE_newvalue' onfocus=\"javascript:change_radio('use_typed')\" onkeypress=\"javascript:change_radio('use_typed')\" /> as the CODE."); |
$r->print("\n<br /><br />"); |
$r->print("\n<br /><br />"); |
} elsif ($error eq 'doublebubble') { |
} elsif ($error eq 'doublebubble') { |
#FIXME Need to print out who this is along with the paper info |
#FIXME Need to print out who this is along with the paper info |
Line 4197 sub scantron_validate_CODE {
|
Line 4208 sub scantron_validate_CODE {
|
my $cdom =$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; |
my $cdom =$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; |
my $cnum =$ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
my $cnum =$ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
my %result=&Apache::lonnet::get('CODEs',[$old_name],$cdom,$cnum); |
my %result=&Apache::lonnet::get('CODEs',[$old_name],$cdom,$cnum); |
my %allcodes=map {($_,1)} split(',',$result{$old_name}); |
my %allcodes=map {(&Apache::lonprintout::num_to_letters($_),1)} split(',',$result{$old_name}); |
|
|
my ($scanlines,$scan_data)=&scantron_getfile(); |
my ($scanlines,$scan_data)=&scantron_getfile(); |
for (my $i=0;$i<=$scanlines->{'count'};$i++) { |
for (my $i=0;$i<=$scanlines->{'count'};$i++) { |