--- loncom/homework/caparesponse/caparesponse.pm 2005/05/23 21:18:25 1.168 +++ loncom/homework/caparesponse/caparesponse.pm 2005/06/26 22:21:06 1.170 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.168 2005/05/23 21:18:25 albertel Exp $ +# $Id: caparesponse.pm,v 1.170 2005/06/26 22:21:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -352,6 +352,11 @@ sub end_numericalresponse { #} } my $response=$ans; + if ($unit) { + my $cleanunit=$unit; + $cleanunit=~s/\$\,//g; + $response.=" $cleanunit"; + } if ($target eq 'answer') { if ($high && $tag eq 'numericalresponse') { $ans.=' ['.$low.','.$high.']'; } if (defined($sighigh) && $tag eq 'numericalresponse') { @@ -376,7 +381,7 @@ sub end_numericalresponse { $parstack,$safeeval); my ($ad,$msg) =&Apache::inputtags::finalizeawards($awards,$msgs); if ($ad ne 'EXACT_ANS' && $ad ne 'APPROX_ANS') { - &Apache::lonxml::error(&mt('Computer\'s answer is incorrect ("[_1]"). It is likely that the tolerance range ("[_2]" to "[_3]") or significant figures ("[_4]" to "[_5]") needs to be adjusted',$response,$low,$high,$siglow,$sighigh)); + &Apache::lonxml::warning(&mt('Computer\'s answer is incorrect ("[_1]"). It is likely that the tolerance range ("[_2]" to "[_3]") or significant figures ("[_4]" to "[_5]") needs to be adjusted',$response,$low,$high,$siglow,$sighigh)); } } if (defined($unit) and ($unit ne '') and