[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 11 Jul 2005 18:24:13 -0000


albertel		Mon Jul 11 14:24:13 2005 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - BUG#4193 - improve can't get things correct error message
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.172 loncom/homework/caparesponse/caparesponse.pm:1.173
--- loncom/homework/caparesponse/caparesponse.pm:1.172	Mon Jun 27 17:52:48 2005
+++ loncom/homework/caparesponse/caparesponse.pm	Mon Jul 11 14:24:12 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.172 2005/06/27 21:52:48 albertel Exp $
+# $Id: caparesponse.pm,v 1.173 2005/07/11 18:24:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -389,7 +389,12 @@
 		my ($ad,$msg)=&Apache::inputtags::finalizeawards($awards,
 								 $msgs);
 
-		my $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);
+		my $error;
+		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') {
 		    &Apache::lonxml::error($error);
 		} else {