version 1.468, 2007/10/26 00:41:31
|
version 1.471, 2007/10/30 00:27:23
|
Line 1852 sub submission {
|
Line 1852 sub submission {
|
$request->print('<h3> <span class="LC_info">Submission Record</span></h3>'."\n". |
$request->print('<h3> <span class="LC_info">Submission Record</span></h3>'."\n". |
'<h4> <b>Resource: </b>'.$env{'form.probTitle'}.'</h4>'."\n"); |
'<h4> <b>Resource: </b>'.$env{'form.probTitle'}.'</h4>'."\n"); |
|
|
if ($env{'form.handgrade'} eq 'no') { |
|
my $checkMark='<br /><br /> <b>Note:</b> Part(s) graded correct by the computer is marked with a '. |
|
$checkIcon.' symbol.'."\n"; |
|
$request->print($checkMark); |
|
} |
|
|
|
# option to display problem, only once else it cause problems |
# option to display problem, only once else it cause problems |
# with the form later since the problem has a form. |
# with the form later since the problem has a form. |
if ($env{'form.vProb'} eq 'yes' or $env{'form.vAns'} eq 'yes') { |
if ($env{'form.vProb'} eq 'yes' or $env{'form.vAns'} eq 'yes') { |
Line 1989 KEYWORDS
|
Line 1983 KEYWORDS
|
$result.= &mt('Submissions'); |
$result.= &mt('Submissions'); |
$result.='<input type="hidden" name="name'.$counter. |
$result.='<input type="hidden" name="name'.$counter. |
'" value="'.$env{'form.fullname'}.'" />'."\n"; |
'" value="'.$env{'form.fullname'}.'" />'."\n"; |
|
if ($env{'form.handgrade'} eq 'no') { |
|
$result.='<span class="LC_grade_check_note">'. |
|
&mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon)."</span>\n"; |
|
|
|
} |
|
|
|
|
|
|
# If any part of the problem is an essay-response (handgraded), then check for collaborators |
# If any part of the problem is an essay-response (handgraded), then check for collaborators |
my $fullname; |
my $fullname; |
Line 5238 sub scan_data {
|
Line 5239 sub scan_data {
|
|
|
sub scantron_parse_scanline { |
sub scantron_parse_scanline { |
my ($line,$whichline,$scantron_config,$scan_data,$just_header)=@_; |
my ($line,$whichline,$scantron_config,$scan_data,$just_header)=@_; |
|
|
my %record; |
my %record; |
my $questions=substr($line,$$scantron_config{'Qstart'}-1); # Answers |
my $questions=substr($line,$$scantron_config{'Qstart'}-1); # Answers |
my $data=substr($line,0,$$scantron_config{'Qstart'}-1); # earlier stuff |
my $data=substr($line,0,$$scantron_config{'Qstart'}-1); # earlier stuff |
Line 5276 sub scantron_parse_scanline {
|
Line 5278 sub scantron_parse_scanline {
|
my $questnum=0; |
my $questnum=0; |
my $ansnum =1; # Multiple 'answer lines'/question. |
my $ansnum =1; # Multiple 'answer lines'/question. |
|
|
while ($questions) { |
chomp($questions); # Get rid of any trailing \n. |
|
$questions =~ s/\r$//; # Get rid of trailing \r too (MAC or Win uploads). |
|
while (length($questions)) { |
my $answers_needed = $bubble_lines_per_response{$questnum}; |
my $answers_needed = $bubble_lines_per_response{$questnum}; |
my $answer_length = $$scantron_config{'Qlength'} * $answers_needed; |
my $answer_length = $$scantron_config{'Qlength'} * $answers_needed; |
|
|
Line 5319 sub scantron_parse_scanline {
|
Line 5323 sub scantron_parse_scanline {
|
} |
} |
if (!&scan_data($scan_data,"$whichline.no_bubble.$questnum")) { |
if (!&scan_data($scan_data,"$whichline.no_bubble.$questnum")) { |
push(@{$record{"scantron.missingerror"}},$questnum); |
push(@{$record{"scantron.missingerror"}},$questnum); |
$ansnum += $answers_needed; |
# $ansnum += $answers_needed; |
} |
} |
|
|
} else { |
} else { |
for (my $ans = 0; $ans < $answers_needed; $ans++) { |
for (my $ans = 0; $ans < $answers_needed; $ans++) { |
$record{"scantron.$ansnum.answer"} = substr($currentquest, $ans, 1); |
$record{"scantron.$ansnum.answer"} = substr($currentquest, $ans, 1); |
Line 6479 ENDSCRIPT
|
Line 6482 ENDSCRIPT
|
join(',',@{$arg}).'" />'); |
join(',',@{$arg}).'" />'); |
foreach my $question (@{$arg}) { |
foreach my $question (@{$arg}) { |
my $selected = &get_response_bubbles($scan_record, $question); |
my $selected = &get_response_bubbles($scan_record, $question); |
&scantron_bubble_selector($r,$scan_config,$question); |
my @select_array = split(/:/,$selected); # ought to be an array of empties. |
|
&scantron_bubble_selector($r,$scan_config,$question, @select_array); |
} |
} |
} else { |
} else { |
$r->print("\n<ul>"); |
$r->print("\n<ul>"); |
Line 6499 ENDSCRIPT
|
Line 6503 ENDSCRIPT
|
$r - Apache request object |
$r - Apache request object |
$scan_config - hash from &get_scantron_config() |
$scan_config - hash from &get_scantron_config() |
$quest - number of the bubble line to make a corrector for |
$quest - number of the bubble line to make a corrector for |
$lines - array of answer lines. |
@lines - array of answer lines. |
|
|
=cut |
=cut |
|
|
Line 6870 sub scantron_validate_missingbubbles {
|
Line 6874 sub scantron_validate_missingbubbles {
|
$scan_data); |
$scan_data); |
if (!defined($$scan_record{'scantron.missingerror'})) { next; } |
if (!defined($$scan_record{'scantron.missingerror'})) { next; } |
my @to_correct; |
my @to_correct; |
|
|
|
# Probably here's where the error is... |
|
|
foreach my $missing (@{$$scan_record{'scantron.missingerror'}}) { |
foreach my $missing (@{$$scan_record{'scantron.missingerror'}}) { |
if ($missing > $max_bubble) { next; } |
if ($missing > $max_bubble) { next; } |
push(@to_correct,$missing); |
push(@to_correct,$missing); |