--- loncom/homework/radiobuttonresponse.pm 2003/06/20 04:05:13 1.72
+++ loncom/homework/radiobuttonresponse.pm 2003/10/24 17:58:55 1.75
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# mutliple choice style responses
#
-# $Id: radiobuttonresponse.pm,v 1.72 2003/06/20 04:05:13 albertel Exp $
+# $Id: radiobuttonresponse.pm,v 1.75 2003/10/24 17:58:55 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -174,7 +174,7 @@ sub end_foilgroup {
}
}
}
- &Apache::lonxml::increment_counter();
+ if ($target ne 'answer') {&Apache::lonxml::increment_counter();}
return $result;
}
@@ -205,7 +205,7 @@ sub displayallfoils {
my $part=$Apache::inputtags::part;
my $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};
my %lastresponse=&Apache::lonnet::str2hash($lastresponse);
- if (($Apache::lonhomework::history{"resource.$part.solved"} =~ /^correct/) || ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER')) {
+ if (&Apache::response::show_answer() ) {
foreach my $name (@names) {
if ($Apache::response::foilgroup{$name.'.value'} ne 'unused') {
$result.="
".$Apache::response::foilgroup{$name.'.value'};
@@ -371,9 +371,8 @@ sub displayfoils {
my ($answer,@whichfoils)=&whichfoils($max,$randomize);
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')) ) {
+ &Apache::response::show_answer() ) {
foreach my $name (@whichfoils) {
if ($target ne 'tex') {
$result.="
";