--- loncom/homework/radiobuttonresponse.pm 2002/11/14 20:30:34 1.61 +++ loncom/homework/radiobuttonresponse.pm 2002/12/02 17:06:08 1.62 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # mutliple choice style responses # -# $Id: radiobuttonresponse.pm,v 1.61 2002/11/14 20:30:34 sakharuk Exp $ +# $Id: radiobuttonresponse.pm,v 1.62 2002/12/02 17:06:08 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -345,7 +345,11 @@ sub displayfoils { my $result; my ($answer,@whichfoils)=&whichfoils($max,$randomize); - if ($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/ || ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER')) { + my $part=$Apache::inputtags::part; + my $solved=$Apache::lonhomework::history{"resource.$part.solved"}; + my $status=$Apache::inputtags::status[-1]; + if ( ($target ne 'tex') && + (($solved =~ /^correct/) || ($status eq 'SHOW_ANSWER')) ) { foreach my $name (@whichfoils) { if ($target ne 'tex') { $result.="
";