version 1.540, 2008/12/21 22:26:48
|
version 1.541, 2008/12/22 14:55:28
|
Line 7242 sub scantron_get_maxbubble {
|
Line 7242 sub scantron_get_maxbubble {
|
foreach my $resource (@resources) { |
foreach my $resource (@resources) { |
my $symb = $resource->symb(); |
my $symb = $resource->symb(); |
|
|
my (@parts,@allparts,@possible_parts); |
my @parts; |
|
|
# Need to retrieve part IDs and response IDs because essayresponse, |
|
# reactionresponse and organicresponse items are not included in |
|
# $analysis{'parts'} from lonnet::ssi. |
|
if (ref($resource->parts()) eq 'ARRAY') { |
|
foreach my $part (@{$resource->parts()}) { |
|
if (!&Apache::loncommon::check_if_partid_hidden($part,$symb,$udom,$uname)) { |
|
my @resp_ids = $resource->responseIds($part); |
|
foreach my $id (@resp_ids) { |
|
my $part_id = $part.'.'.$id; |
|
push(@possible_parts,$part_id); |
|
} |
|
} |
|
} |
|
} |
|
|
|
my $result=&ssi_with_retries($resource->src(), $ssi_retries, |
my $result=&ssi_with_retries($resource->src(), $ssi_retries, |
('symb' => $symb, |
('symb' => $symb, |
Line 7278 sub scantron_get_maxbubble {
|
Line 7263 sub scantron_get_maxbubble {
|
} |
} |
} |
} |
} |
} |
# Add part_ids for any essayresponse, reactionresponse or |
|
# organicresponse items. |
|
foreach my $part_id (@possible_parts) { |
|
if (grep(/^\Q$part_id\E$/,@parts)) { |
|
push(@allparts,$part_id); |
|
} else { |
|
if (($analysis{$part_id.'.type'} eq 'essayresponse') || |
|
($analysis{$part_id.'.type'} eq 'reactionresponse') || |
|
($analysis{$part_id.'.type'} eq 'organicresponse')) { |
|
push(@allparts,$part_id); |
|
} |
|
} |
|
} |
|
|
|
foreach my $part_id (@allparts) { |
foreach my $part_id (@parts) { |
my $lines; |
my $lines; |
|
|
# TODO - make this a persistent hash not an array. |
# TODO - make this a persistent hash not an array. |