version 1.40, 2003/04/08 02:47:42
|
version 1.42, 2003/05/09 20:44:54
|
Line 74 sub end_hintgroup {
|
Line 74 sub end_hintgroup {
|
&Apache::lonxml::debug("found :$id:$numtries:$hinttries:"); |
&Apache::lonxml::debug("found :$id:$numtries:$hinttries:"); |
my $hinttext=&Apache::lonxml::endredirection; |
my $hinttext=&Apache::lonxml::endredirection; |
if ($Apache::lonhomework::type ne 'exam' && |
if ($Apache::lonhomework::type ne 'exam' && |
$numtries >= $hinttries && $hinttext !~/^\s*$/) { |
$numtries >= $hinttries && $hinttext =~/\S/) { |
$result='<table bgcolor="#dddddd"><tr><td>'. |
$result='<table bgcolor="#dddddd"><tr><td>'. |
$hinttext.'</td></tr></table>'; |
$hinttext.'</td></tr></table>'; |
} |
} |
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; |
|
} |
} |
} |
} |
} |
} |
} |