version 1.508, 2008/02/05 18:32:34
|
version 1.509, 2008/02/06 00:39:11
|
Line 4681 my %bubble_lines_per_response; # no.
|
Line 4681 my %bubble_lines_per_response; # no.
|
|
|
my %first_bubble_line; # First bubble line no. for each bubble. |
my %first_bubble_line; # First bubble line no. for each bubble. |
|
|
my %subdivided_bubble_lines; # no. bubble lines for optionresponse |
my %subdivided_bubble_lines; # no. bubble lines for optionresponse, |
# or matchresponse where an individual |
# matchresponse or rankresponse, where |
# response can have multiple lines |
# an individual response can have multiple |
|
# lines |
|
|
my %responsetype_per_response; # responsetype for each response |
my %responsetype_per_response; # responsetype for each response |
|
|
Line 6792 for multi and missing bubble cases).
|
Line 6793 for multi and missing bubble cases).
|
Numbered from 0 (but question numbers are from |
Numbered from 0 (but question numbers are from |
1. |
1. |
%first_bubble_line - Starting bubble line for each question. |
%first_bubble_line - Starting bubble line for each question. |
%subdivided_bubble_lines - optionresponse and matchresponse type |
%subdivided_bubble_lines - optionresponse, matchresponse and rankresponse |
problems render as separate sub-questions, |
type problems render as separate sub-questions, |
in exam mode. This hash contains a |
in exam mode. This hash contains a |
comma-separated list of the lines per |
comma-separated list of the lines per |
sub-question. |
sub-question. |
Line 7113 sub scantron_validate_doublebubble {
|
Line 7114 sub scantron_validate_doublebubble {
|
which are the total number of bubble, lines, the number of bubble |
which are the total number of bubble, lines, the number of bubble |
lines for response n and number of the first bubble line for response n, |
lines for response n and number of the first bubble line for response n, |
and a comma separated list of numbers of bubble lines for sub-questions |
and a comma separated list of numbers of bubble lines for sub-questions |
(for optionresponse items only), for response n. |
(for optionresponse, matchresponse, and rankresponse items), for response n. |
|
|
=cut |
=cut |
|
|
Line 7186 sub scantron_get_maxbubble {
|
Line 7187 sub scantron_get_maxbubble {
|
|
|
# TODO - make this a persistent hash not an array. |
# TODO - make this a persistent hash not an array. |
|
|
# optionresponse and matchresponse type items render as |
# optionresponse, matchresponse and rankresponse type items |
# separate sub-questions in exam mode. |
# render as separate sub-questions in exam mode. |
if (($analysis{$part_id.'.type'} eq 'optionresponse') || |
if (($analysis{$part_id.'.type'} eq 'optionresponse') || |
($analysis{$part_id.'.type'} eq 'matchresponse')) { |
($analysis{$part_id.'.type'} eq 'matchresponse') || |
|
($analysis{$part_id.'.type'} eq 'rankresponse')) { |
my ($numbub,$numshown); |
my ($numbub,$numshown); |
if ($analysis{$part_id.'.type'} eq 'optionresponse') { |
if ($analysis{$part_id.'.type'} eq 'optionresponse') { |
if (ref($analysis{$part_id.'.options'}) eq 'ARRAY') { |
if (ref($analysis{$part_id.'.options'}) eq 'ARRAY') { |
Line 7199 sub scantron_get_maxbubble {
|
Line 7201 sub scantron_get_maxbubble {
|
if (ref($analysis{$part_id.'.items'}) eq 'ARRAY') { |
if (ref($analysis{$part_id.'.items'}) eq 'ARRAY') { |
$numbub = scalar(@{$analysis{$part_id.'.items'}}); |
$numbub = scalar(@{$analysis{$part_id.'.items'}}); |
} |
} |
|
} elsif ($analysis{$part_id.'.type'} eq 'rankresponse') { |
|
if (ref($analysis{$part_id.'.foils'}) eq 'ARRAY') { |
|
$numbub = scalar(@{$analysis{$part_id.'.foils'}}); |
|
} |
} |
} |
if (ref($analysis{$part_id.'.shown'}) eq 'ARRAY') { |
if (ref($analysis{$part_id.'.shown'}) eq 'ARRAY') { |
$numshown = scalar(@{$analysis{$part_id.'.shown'}}); |
$numshown = scalar(@{$analysis{$part_id.'.shown'}}); |