[LON-CAPA-cvs] cvs: loncom /homework default_homework.lcpm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Sat, 27 Sep 2008 07:26:47 -0000
raeburn Sat Sep 27 03:26:47 2008 EDT
Modified files:
/loncom/homework default_homework.lcpm
Log:
Bug 5806. Although % is not a LON-CAPA unit it has apparently been used as such.
- Revert to pre-1.133 behavior (2.6.X and earlier) for published problems where the unit was set to %.
- Work in progress if % is to become a 'real' unit.
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.140 loncom/homework/default_homework.lcpm:1.141
--- loncom/homework/default_homework.lcpm:1.140 Fri Sep 12 22:08:32 2008
+++ loncom/homework/default_homework.lcpm Sat Sep 27 03:26:45 2008
@@ -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.140 2008/09/13 02:08:32 raeburn Exp $
+# $Id: default_homework.lcpm,v 1.141 2008/09/27 07:26:45 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -320,7 +320,7 @@
$element =~ s/\s//g;
}
my $appendunit=$unit;
- if ($unit=~/\%/) {
+ if (($unit=~/\%/) && ($answerunit ne '%')) {
$element=$element/100;
$appendunit=~s/\%//;
}