version 1.168, 2005/05/23 21:18:25
|
version 1.170, 2005/06/26 22:21:06
|
Line 352 sub end_numericalresponse {
|
Line 352 sub end_numericalresponse {
|
#} |
#} |
} |
} |
my $response=$ans; |
my $response=$ans; |
|
if ($unit) { |
|
my $cleanunit=$unit; |
|
$cleanunit=~s/\$\,//g; |
|
$response.=" $cleanunit"; |
|
} |
if ($target eq 'answer') { |
if ($target eq 'answer') { |
if ($high && $tag eq 'numericalresponse') { $ans.=' ['.$low.','.$high.']'; } |
if ($high && $tag eq 'numericalresponse') { $ans.=' ['.$low.','.$high.']'; } |
if (defined($sighigh) && $tag eq 'numericalresponse') { |
if (defined($sighigh) && $tag eq 'numericalresponse') { |
Line 376 sub end_numericalresponse {
|
Line 381 sub end_numericalresponse {
|
$parstack,$safeeval); |
$parstack,$safeeval); |
my ($ad,$msg) =&Apache::inputtags::finalizeawards($awards,$msgs); |
my ($ad,$msg) =&Apache::inputtags::finalizeawards($awards,$msgs); |
if ($ad ne 'EXACT_ANS' && $ad ne 'APPROX_ANS') { |
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 |
if (defined($unit) and ($unit ne '') and |