Diff for /loncom/homework/caparesponse/caparesponse.pm between versions 1.174 and 1.175

version 1.174, 2005/07/11 18:35:23 version 1.175, 2005/07/14 02:52:22
Line 386  sub end_numericalresponse { Line 386  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') {
  # answer failed check if it is sig figs that is failing  
  my ($awards,$msgs)=&check_submission($response,$partid,$id,  
      $tag,$parstack,$safeeval,  
      1);  
  my ($ad,$msg)=&Apache::inputtags::finalizeawards($awards,  
  $msgs);  
   
  my $error;   my $error;
  if ($siglow ne '' && $sighigh ne '') {   if ($tag eq 'formularesponse') {
     $error=&mt('Computer\'s answer is incorrect ("[_1]"). It is likely that the tolerance range ("[_2]" to "[_3]") or significant figures ("[_4]" to "[_5]") need to be adjusted.',$response,$low,$high,$siglow,$sighigh);      $error=&mt('Computer\'s answer is incorrect ("[_1]").');
  } else {   } else {
     $error=&mt('Computer\'s answer is incorrect ("[_1]"). It is likely that the tolerance range ("[_2]" to "[_3]") needs to be adjusted.',$response,$low,$high);      # answer failed check if it is sig figs that is failing
       my ($awards,$msgs)=&check_submission($response,$partid,$id,
    $tag,$parstack,
    $safeeval,1);
       ($ad,$msg)=&Apache::inputtags::finalizeawards($awards,
     $msgs);
       
       if ($siglow ne '' && $sighigh ne '') {
    $error=&mt('Computer\'s answer is incorrect ("[_1]"). It is likely that the tolerance range ("[_2]" to "[_3]") or significant figures ("[_4]" to "[_5]") need to be adjusted.',$response,$low,$high,$siglow,$sighigh);
       } else {
    $error=&mt('Computer\'s answer is incorrect ("[_1]"). It is likely that the tolerance range ("[_2]" to "[_3]") needs to be adjusted.',$response,$low,$high);
       }
  }   }
  if ($ad ne 'EXACT_ANS' && $ad ne 'APPROX_ANS') {   if ($ad ne 'EXACT_ANS' && $ad ne 'APPROX_ANS') {
     &Apache::lonxml::error($error);      &Apache::lonxml::error($error);

Removed from v.1.174  
changed lines
  Added in v.1.175


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>