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

raeburn raeburn at source.lon-capa.org
Thu Feb 18 13:40:05 EST 2016


raeburn		Thu Feb 18 18:40:05 2016 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - Bug 6817
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.256 loncom/homework/caparesponse/caparesponse.pm:1.257
--- loncom/homework/caparesponse/caparesponse.pm:1.256	Fri Oct 30 03:49:55 2015
+++ loncom/homework/caparesponse/caparesponse.pm	Thu Feb 18 18:40:05 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.256 2015/10/30 03:49:55 raeburn Exp $
+# $Id: caparesponse.pm,v 1.257 2016/02/18 18:40:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -790,7 +790,10 @@
 						    $tag,$parstack,
 						    $safeeval,1);
 		    $error=&mt("Computer's answer is incorrect ([_1]).",'"'.join(', ',@$response).'"').' ';
-		    if ($sigline ne '') {
+                    if ($ad eq 'UNIT_INVALID_STUDENT') {
+                        $error.=&mt('Unable to interpret units. Computer reads units as "[_1]".',$msg).' '.
+                                &mt('The unit attribute in the numericalresponse item needs to be a supported physical unit.');
+		    } elsif ($sigline ne '') {
 			$error.=&mt('It is likely that the tolerance range [_1] or significant figures [_2] need to be adjusted.',$tolline,$sigline);
 		    } else {
 			$error.=&mt('It is likely that the tolerance range [_1] needs to be adjusted.',$tolline);




More information about the LON-CAPA-cvs mailing list