--- loncom/homework/caparesponse/caparesponse.pm 2003/09/22 18:38:59 1.111 +++ loncom/homework/caparesponse/caparesponse.pm 2003/09/22 18:47:59 1.112 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.111 2003/09/22 18:38:59 sakharuk Exp $ +# $Id: caparesponse.pm,v 1.112 2003/09/22 18:47:59 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -171,18 +171,13 @@ sub end_numericalresponse { my $status = $Apache::inputtags::status['-1']; if ( ($award =~ /^correct/ && lc($Apache::lonhomework::problemstatus) ne 'no') - || $status eq "SHOW_ANSWER" - || $ENV{'form.texaward'} eq 'SHOW_ANSWER') { + || $status eq "SHOW_ANSWER") { my (@formats)=&Apache::lonxml::get_param_var('format',$parstack, $safeeval); my $unit=&Apache::lonxml::get_param_var('unit',$parstack, $safeeval); if ($target eq 'web') { $result="
The correct answer is "; - } elsif ($target eq 'tex') { - if ($ENV{'form.texaward'} eq 'SHOW_ANSWER') { - $result='\vskip 0 mm The correct answer is \\texttt{ '; - } } for (my $i=0; $i <= $#answers; $i++) { my $answer=$answers[$i]; @@ -201,9 +196,6 @@ sub end_numericalresponse { &Apache::lonxml::debug("no format answer :$answer:"); $formatted="$answer,"; } - if ($ENV{'form.texaward'} eq 'SHOW_ANSWER') { - $result.=$formatted; - } if ($target eq 'tex') { $formatted=''; #$formatted=&Apache::lonxml::latex_special_symbols($formatted); @@ -213,11 +205,6 @@ sub end_numericalresponse { chop $result; if ($target eq 'web') { $result.=" $unit.
"; - } elsif ($target eq 'tex') { - if ($ENV{'form.texaward'} eq 'SHOW_ANSWER') { - $result.=&Apache::lonxml::latex_special_symbols($unit); - $result.="}. \\vskip 0 mm "; - } } } if ($Apache::lonhomework::type eq 'exam') { @@ -315,6 +302,7 @@ sub end_numericalresponse { ($sighigh,$siglow)=&get_sigrange($Apache::inputtags::params{'sig'}); } if ($fmt && $$tagstack[-1] eq 'numericalresponse') { + $fmt=~s/e/E/g; $ans = sprintf('%.'.$fmt,$ans); if ($high) { $high=sprintf('%.'.$fmt,$high);