[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /homework default_homework.lcpm

raeburn raeburn at source.lon-capa.org
Tue Aug 2 23:37:23 EDT 2011


raeburn		Wed Aug  3 03:37:23 2011 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/homework	default_homework.lcpm 
  Log:
  - Backport 1.160.
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.152 loncom/homework/default_homework.lcpm:1.152.2.1
--- loncom/homework/default_homework.lcpm:1.152	Sat Feb 26 17:50:13 2011
+++ loncom/homework/default_homework.lcpm	Wed Aug  3 03:37:23 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
 #
-# $Id: default_homework.lcpm,v 1.152 2011/02/26 17:50:13 raeburn Exp $
+# $Id: default_homework.lcpm,v 1.152.2.1 2011/08/03 03:37:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -341,7 +341,7 @@
              $appendunit='%'.$appendunit;
           }
 # Zero does not need a dimension
-          if (($element==0) && ($unit!~/\w/) && ($answerunit=~/\w/)) {
+          if (($element =~ /^[0\.]+$/) && ($unit!~/\w/) && ($answerunit=~/\w/)) {
              $appendunit=$answerunit;
           }
           if ($appendunit ne '') {




More information about the LON-CAPA-cvs mailing list