[LON-CAPA-cvs] cvs: loncom /homework default_homework.lcpm
raeburn
raeburn at source.lon-capa.org
Tue Aug 2 23:14:29 EDT 2011
raeburn Wed Aug 3 03:14:29 2011 EDT
Modified files:
/loncom/homework default_homework.lcpm
Log:
- Bug 6466.
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.159 loncom/homework/default_homework.lcpm:1.160
--- loncom/homework/default_homework.lcpm:1.159 Thu Jun 9 15:43:56 2011
+++ loncom/homework/default_homework.lcpm Wed Aug 3 03:14:29 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.159 2011/06/09 15:43:56 www Exp $
+# $Id: default_homework.lcpm,v 1.160 2011/08/03 03:14:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -357,7 +357,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;
}
# Do the math for the student if allowed
More information about the LON-CAPA-cvs
mailing list