version 1.167, 2005/04/16 15:36:25
|
version 1.168, 2005/05/23 21:18:25
|
Line 174 sub end_numericalresponse {
|
Line 174 sub end_numericalresponse {
|
my $partid = $Apache::inputtags::part; |
my $partid = $Apache::inputtags::part; |
my $id = $Apache::inputtags::response[-1]; |
my $id = $Apache::inputtags::response[-1]; |
my $tag; |
my $tag; |
|
$safeeval->share_from('capa',['&caparesponse_capa_check_answer']); |
if (scalar(@$tagstack)) { $tag=$$tagstack[-1]; } |
if (scalar(@$tagstack)) { $tag=$$tagstack[-1]; } |
if ( $target eq 'grade' && &Apache::response::submitted() ) { |
if ( $target eq 'grade' && &Apache::response::submitted() ) { |
&Apache::response::setup_params($tag,$safeeval); |
&Apache::response::setup_params($tag,$safeeval); |
$safeeval->share_from('capa',['&caparesponse_capa_check_answer']); |
|
if ($Apache::lonhomework::type eq 'exam' && |
if ($Apache::lonhomework::type eq 'exam' && |
$tag eq 'formularesponse') { |
$tag eq 'formularesponse') { |
$increment=&Apache::response::scored_response($partid,$id); |
$increment=&Apache::response::scored_response($partid,$id); |
Line 376 sub end_numericalresponse {
|
Line 376 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. It is likely that the tolerance range or significant figures needs to be adjusted')); |
&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)); |
} |
} |
} |
} |
if (defined($unit) and ($unit ne '') and |
if (defined($unit) and ($unit ne '') and |