--- loncom/homework/optionresponse.pm 2002/11/11 20:26:59 1.62 +++ 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.62 2002/11/11 20:26:59 albertel 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; @@ -400,8 +402,8 @@ 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'};