--- loncom/homework/optionresponse.pm 2006/02/06 21:59:23 1.132 +++ loncom/homework/optionresponse.pm 2007/01/17 10:46:13 1.136 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.132 2006/02/06 21:59:23 albertel Exp $ +# $Id: optionresponse.pm,v 1.136 2007/01/17 10:46:13 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -185,6 +185,7 @@ sub end_foilgroup { $result.=&displayfoils($target,$max,$randomize,$TeXlayout,@opt); } elsif ( $target eq 'answer') { $result.=&displayanswers($max,$randomize,@opt); + } elsif ( $target eq 'analyze') { my @shown = &whichfoils($max,$randomize); &Apache::response::analyze_store_foilgroup(\@shown, @@ -414,7 +415,7 @@ sub displayfoils { foreach my $option (@opt) { my $escopt=&HTML::Entities::encode($option,'\'"&<>'); if ($option eq $lastopt) { - $optionlist.="\n"; + $optionlist.="\n"; } else { $optionlist.="\n"; } @@ -448,7 +449,7 @@ sub displayfoils { $texoptionlist = &optionlist_correction($TeXlayout,@opt); } if ($text=~//) { - $text=~s|| \\makebox\[0\.3in\]\[b\]\{\\hrulefill\} |; + $text=~s|| \\makebox\[0\.3in\]\[b\]\{\\hrulefill\} |g; } if ($text=~m/\\item /) { @@ -688,14 +689,14 @@ sub end_foil { sub start_drawoptionlist { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; - if ($target ne 'meta') { + if (($target ne 'meta') && ($target ne 'answer')) { return $token->[4]; } } sub end_drawoptionlist { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; - if ($target ne 'meta') { + if (($target ne 'meta') && ($target ne 'answer')) { return $token->[2]; } }