--- loncom/homework/caparesponse/caparesponse.pm 2003/07/24 13:25:37 1.106 +++ loncom/homework/caparesponse/caparesponse.pm 2003/08/21 17:33:22 1.108 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.106 2003/07/24 13:25:37 sakharuk Exp $ +# $Id: caparesponse.pm,v 1.108 2003/08/21 17:33:22 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -247,7 +247,7 @@ sub end_numericalresponse {

'; } } elsif ($target eq 'tex') { - if (defined $unit and $Apache::lonhomework::type eq 'exam') { + if ((defined $unit) and ($unit=~/\S/) and ($Apache::lonhomework::type eq 'exam')) { $result.=' \textit{(in} \verb|'.$unit.'|\textit{)} '; } if ($$tagstack[-1] eq 'numericalresponse') { @@ -366,7 +366,7 @@ sub end_numericalresponse { if ($target eq 'answer') { if ($ENV{'form.answer_output_mode'} eq 'tex') { $result.=&Apache::response::answer_part($$tagstack[-1], - "\\textbf{$string}"); + "$string"); } else { $result.=&Apache::response::answer_part($$tagstack[-1], "$string");