--- loncom/homework/caparesponse/caparesponse.pm 2005/04/16 15:36:25 1.167 +++ loncom/homework/caparesponse/caparesponse.pm 2005/05/23 21:18:25 1.168 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.167 2005/04/16 15:36:25 albertel Exp $ +# $Id: caparesponse.pm,v 1.168 2005/05/23 21:18:25 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -174,10 +174,10 @@ sub end_numericalresponse { my $partid = $Apache::inputtags::part; my $id = $Apache::inputtags::response[-1]; my $tag; + $safeeval->share_from('capa',['&caparesponse_capa_check_answer']); if (scalar(@$tagstack)) { $tag=$$tagstack[-1]; } if ( $target eq 'grade' && &Apache::response::submitted() ) { &Apache::response::setup_params($tag,$safeeval); - $safeeval->share_from('capa',['&caparesponse_capa_check_answer']); if ($Apache::lonhomework::type eq 'exam' && $tag eq 'formularesponse') { $increment=&Apache::response::scored_response($partid,$id); @@ -376,7 +376,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. 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