version 1.513, 2008/03/04 11:23:12
|
version 1.513.2.1, 2008/03/24 19:08:09
|
Line 7231 sub scantron_get_maxbubble {
|
Line 7231 sub scantron_get_maxbubble {
|
my $response_number = 0; |
my $response_number = 0; |
my $bubble_line = 0; |
my $bubble_line = 0; |
foreach my $resource (@resources) { |
foreach my $resource (@resources) { |
|
my $symb = $resource->symb(); |
# Need to retrieve part IDs and response IDs because essayresponse, |
# Need to retrieve part IDs and response IDs because essayresponse, |
# reactionresponse and organicresponse items are not included in |
# reactionresponse and organicresponse items are not included in |
# $analysis{'parts'} from lonnet::ssi. |
# $analysis{'parts'} from lonnet::ssi. |
my %possible_part_ids; |
my %possible_part_ids; |
if (ref($resource->parts()) eq 'ARRAY') { |
if (ref($resource->parts()) eq 'ARRAY') { |
foreach my $part (@{$resource->parts()}) { |
foreach my $part (@{$resource->parts()}) { |
my @resp_ids = $resource->responseIds($part); |
if (!&Apache::loncommon::check_if_partid_hidden($part,$symb,$udom,$uname)) { |
foreach my $id (@resp_ids) { |
my @resp_ids = $resource->responseIds($part); |
$possible_part_ids{$part.'.'.$id} = 1; |
foreach my $id (@resp_ids) { |
|
$possible_part_ids{$part.'.'.$id} = 1; |
|
} |
} |
} |
} |
} |
} |
} |
my $result=&ssi_with_retries($resource->src(), $ssi_retries, |
my $result=&ssi_with_retries($resource->src(), $ssi_retries, |
('symb' => $resource->symb()), |
('symb' => $symb), |
('grade_target' => 'analyze'), |
('grade_target' => 'analyze'), |
('grade_courseid' => $cid), |
('grade_courseid' => $cid), |
('grade_domain' => $udom), |
('grade_domain' => $udom), |
Line 7257 sub scantron_get_maxbubble {
|
Line 7260 sub scantron_get_maxbubble {
|
my %analysis = &Apache::lonnet::str2hash($an); |
my %analysis = &Apache::lonnet::str2hash($an); |
|
|
if (ref($analysis{'parts'}) eq 'ARRAY') { |
if (ref($analysis{'parts'}) eq 'ARRAY') { |
@parts = @{$analysis{'parts'}}; |
foreach my $part (@{$analysis{'parts'}}) { |
|
my ($id,$respid) = split(/\./,$part); |
|
if (!&Apache::loncommon::check_if_partid_hidden($id,$symb,$udom,$uname)) { |
|
push(@parts,$part); |
|
} |
|
} |
} |
} |
# Add part_ids for any essayresponse items. |
# Add part_ids for any essayresponse items. |
foreach my $part_id (keys(%possible_part_ids)) { |
foreach my $part_id (keys(%possible_part_ids)) { |