--- loncom/homework/optionresponse.pm 2002/11/13 16:53:11 1.63
+++ loncom/homework/optionresponse.pm 2002/12/02 17:06:08 1.65
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.63 2002/11/13 16:53:11 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.65 2002/12/02 17:06:08 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -319,8 +319,11 @@ sub displayfoils {
my $part=$Apache::inputtags::part;
my $id=$Apache::inputtags::response[-1];
my $break;
- if (($Apache::lonhomework::history{"resource.$part.solved"} =~ /^correct/) || ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER')) {
- my $temp=1; ####
+ 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 $name (@whichopt) {
my $text=$Apache::response::foilgroup{$name.'.text'};
if ($text!~/^\s*$/) {
@@ -353,7 +356,6 @@ sub displayfoils {
$result.=&bubbles(\@alphabet,\@opt);
}
}
- $temp++;
}
} else {
my $temp=1;
@@ -401,7 +403,7 @@ sub displayfoils {
if ($Apache::response::foilgroup{$name.'.text'}=~//) {
$Apache::response::foilgroup{$name.'.text'}=~s|| \\makebox\[0\.3in\]\[b\]\{\\hrulefill\} |;
}
- $result.= $texoptionlist.$Apache::response::foilgroup{$name.'.text'};
+ $result.= $texoptionlist.$Apache::response::foilgroup{$name.'.text'};
} else {
if ($Apache::lonhomework::type eq 'exam') {
$result.= $texoptionlist.'\vspace*{-2 mm}\item[\textbf{'.$Apache::lonxml::counter.'}.]'.$Apache::response::foilgroup{$name.'.text'};