version 1.41, 2003/04/18 07:53:15
|
version 1.42, 2003/05/09 20:44:54
|
Line 348 sub end_radiobuttonhint {
|
Line 348 sub end_radiobuttonhint {
|
my $response = $Apache::lonhomework::history{ |
my $response = $Apache::lonhomework::history{ |
"resource.$part_id.submission"}; |
"resource.$part_id.submission"}; |
($response)=&Apache::lonnet::str2hash($response); |
($response)=&Apache::lonnet::str2hash($response); |
if ($answer[0] eq 'foil' && $response eq $answer[1]) { |
&Apache::lonxml::debug("response is $response"); |
push (@Apache::hint::which,$name); |
|
|
if ($answer[0] eq 'foil') { |
|
shift(@answer); |
|
foreach my $answer (@answer) { |
|
if ($response eq $answer) { |
|
push (@Apache::hint::which,$name); |
|
last; |
|
} |
|
} |
} elsif ($answer[0] eq 'concept') { |
} elsif ($answer[0] eq 'concept') { |
if (ref($Apache::hint::radiobutton{"$part_id.concept.".$answer[1]})) { |
shift(@answer); |
my @names=@{ $Apache::hint::radiobutton{"$part_id.concept.".$answer[1]} }; |
foreach my $answer (@answer) { |
if (grep(/^\Q$response\E$/,@names)) { |
if (ref($Apache::hint::radiobutton{"$part_id.concept.".$answer})) { |
push(@Apache::hint::which,$name); |
my @names=@{ $Apache::hint::radiobutton{"$part_id.concept.".$answer} }; |
|
if (grep(/^\Q$response\E$/,@names)) { |
|
push(@Apache::hint::which,$name); |
|
last; |
|
} |
} |
} |
} |
} |
} |
} |