version 1.461, 2007/10/17 10:48:20
|
version 1.462, 2007/10/24 09:51:47
|
Line 5383 sub scantron_parse_scanline {
|
Line 5383 sub scantron_parse_scanline {
|
|
|
my $first_answer = $ansnum; |
my $first_answer = $ansnum; |
for (my $ans =0; $ans < $answers_needed; $ans++) { |
for (my $ans =0; $ans < $answers_needed; $ans++) { |
$record{"scantron.$ansnum.answer"} = ''; |
my $item = $first_answer+$ans; |
$ans++; |
$record{"scantron.$item.answer"} = ''; |
} |
} |
|
|
my @ans=@array; |
my @ans=@array; |
my $i=length($ans[0]);shift(@ans); |
my $i=0; |
|
my $increment = 0; |
while ($#ans) { |
while ($#ans) { |
$i+=length($ans[0])+1; |
$i+=length($ans[0]) + $increment; |
my $line = $i/$$scantron_config{'Qlength'} + $first_answer; |
my $line = int($i/$$scantron_config{'Qlength'} + $first_answer); |
my $bubble = $i%$$scantron_config{'Qlength'}; |
my $bubble = $i%$$scantron_config{'Qlength'}; |
|
|
$record{"scantron.$line.answer"}.=$alphabet[$bubble]; |
$record{"scantron.$line.answer"}.=$alphabet[$bubble]; |
shift(@ans); |
shift(@ans); |
|
$increment = 1; |
} |
} |
|
$ansnum += $answers_needed; |
} |
} |
} |
} |
} |
} |
Line 6492 sub scantron_bubble_selector {
|
Line 6494 sub scantron_bubble_selector {
|
if ($l != 0) { |
if ($l != 0) { |
$r->print('<tr>'); |
$r->print('<tr>'); |
} |
} |
|
my @selected = split(//,$lines[$l]); |
for (my $i=0;$i<$max;$i++) { |
for (my $i=0;$i<$max;$i++) { |
my @selected = split(//,$lines[$l]); |
|
$r->print("\n".'<td align="center">'); |
$r->print("\n".'<td align="center">'); |
if ($selected[0] eq $alphabet[$i]) { |
if ($selected[0] eq $alphabet[$i]) { |
$r->print('X'); |
$r->print('X'); |