--- loncom/homework/optionresponse.pm 2003/09/09 13:36:11 1.85 +++ loncom/homework/optionresponse.pm 2003/10/13 19:25:30 1.89 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.85 2003/09/09 13:36:11 sakharuk Exp $ +# $Id: optionresponse.pm,v 1.89 2003/10/13 19:25:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -302,10 +302,8 @@ sub displayfoils { my $id=$Apache::inputtags::response[-1]; my $break; my $solved=$Apache::lonhomework::history{"resource.$part.solved"}; - my $status=$Apache::inputtags::status[-1]; - if ( - ($target ne 'tex') && - (($solved =~ /^correct/) || ($status eq 'SHOW_ANSWER')) ) { + if ( ($target ne 'tex') && + &Apache::response::show_answer() ) { foreach $name (@whichopt) { my $text=$Apache::response::foilgroup{$name.'.text'}; if ($text!~/^\s*$/) { @@ -603,7 +601,7 @@ sub end_foil { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $text =''; my $result = ''; - if ($target eq 'web' || $target eq 'tex') { + if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { $text=&Apache::lonxml::endredirection; if ($target eq 'tex' and $Apache::lonhomework::type ne 'exam') { $text = '\vspace*{-2 mm}\item '.$text; } } @@ -623,11 +621,7 @@ sub end_foil { if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { $Apache::response::conceptgroup{"$name.text"} = '\vskip 4 mm $\triangleright$ '.$text; } else { - if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { - $Apache::response::conceptgroup{"$name.text"} = ' $\triangleright$ '.$text; - } else { - $Apache::response::conceptgroup{"$name.text"} = $text; - } + $Apache::response::conceptgroup{"$name.text"} = $text; } $Apache::response::conceptgroup{"$name.location"} = $location; } else { @@ -636,11 +630,7 @@ sub end_foil { if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { $Apache::response::foilgroup{"$name.text"} = '\vskip 5 mm $\triangleright$ '.$text; } else { - if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') { - $Apache::response::foilgroup{"$name.text"} = ' $\triangleright$ '.$text; - } else { - $Apache::response::foilgroup{"$name.text"} = $text; - } + $Apache::response::foilgroup{"$name.text"} = $text; } $Apache::response::foilgroup{"$name.location"} = $location; }