version 1.495, 2007/11/16 08:55:02
|
version 1.496, 2007/11/19 10:57:23
|
Line 6669 sub scantron_bubble_selector {
|
Line 6669 sub scantron_bubble_selector {
|
if ($scmode eq 'number' || $scmode eq 'letter') { $max=10; } |
if ($scmode eq 'number' || $scmode eq 'letter') { $max=10; } |
|
|
my $response = $quest-1; |
my $response = $quest-1; |
my $lines = $bubble_lines_per_response{$response}; |
my $lines = $bubble_lines_per_response{$response}; |
|
my $line_number = $first_bubble_line{$response} +1; |
|
|
my $total_lines = $lines*2; |
my $total_lines = $lines*2; |
my @alphabet=('A'..'Z'); |
my @alphabet=('A'..'Z'); |
|
|
$r->print("<table border='1'><tr><td rowspan='".$total_lines."'>$quest</td>"); |
$r->print("<table border='1'>\n"); |
|
|
for (my $l = 0; $l < $lines; $l++) { |
for (my $l = 0; $l < $lines; $l++) { |
if ($l != 0) { |
$r->print("<tr><td></td>\n"); |
$r->print('<tr>'); |
|
} |
|
my @selected = split(//,$lines[$l]); |
my @selected = split(//,$lines[$l]); |
for (my $i=0;$i<$max;$i++) { |
for (my $i=0;$i<$max;$i++) { |
$r->print("\n".'<td align="center">'); |
$r->print("\n".'<td align="center">'); |
Line 6701 sub scantron_bubble_selector {
|
Line 6700 sub scantron_bubble_selector {
|
|
|
} |
} |
|
|
$r->print('</tr><tr>'); |
$r->print("</tr><tr><td>$line_number</td>"); |
|
|
# FIXME: This may have to be a bit more clever for |
# FIXME: This may have to be a bit more clever for |
# multiline questions (different values e.g..). |
# multiline questions (different values e.g..). |
|
|
for (my $i=0;$i<$max;$i++) { |
for (my $i=0;$i<$max;$i++) { |
my $value = "$l:$i"; # Relative bubble line #: Bubble in line. |
my $value = "$l:$i"; # Relative bubble line #: Bubble in line. |
$r->print("\n". |
$r->print("\n". |
Line 6713 sub scantron_bubble_selector {
|
Line 6711 sub scantron_bubble_selector {
|
$quest.'" value="'.$value.'" />'.$alphabet[$i]."</label></td>"); |
$quest.'" value="'.$value.'" />'.$alphabet[$i]."</label></td>"); |
} |
} |
$r->print('</tr>'); |
$r->print('</tr>'); |
|
$line_number++; |
|
|
} |
} |
$r->print('</table>'); |
$r->print('</table>'); |