[LON-CAPA-cvs] cvs: loncom /homework default_homework.lcpm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 09 Jun 2004 21:08:22 -0000
albertel Wed Jun 9 17:08:22 2004 EDT
Modified files:
/loncom/homework default_homework.lcpm
Log:
BUG#3069
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.85 loncom/homework/default_homework.lcpm:1.86
--- loncom/homework/default_homework.lcpm:1.85 Fri Jun 4 18:56:46 2004
+++ loncom/homework/default_homework.lcpm Wed Jun 9 17:08:21 2004
@@ -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.85 2004/06/04 22:56:46 albertel Exp $
+# $Id: default_homework.lcpm,v 1.86 2004/06/09 21:08:21 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -535,7 +535,7 @@
if ($fmt =~ /chem/i) { return(&chemparse($value)); }
my ($dollarmode,$commamode,$alwaysperiod,$options);
if ($fmt =~ /^([^\d]*)(.*)/) { $options=$1; $fmt=$2; }
- if ($options =~ /\$/) { $dollamode=1; }
+ if ($options =~ /\$/) { $dollarmode=1; }
if ($options =~ /,/) { $commamode=1; }
if ($options =~ /\./) { $alwaysperiod=1; }
if ($fmt) { $value=sprintf('%.'.$fmt,$value); }
@@ -568,8 +568,8 @@
}
} else {
$result=$value;
- if ($dollarmode) { $result=&dollarformat($result,$target); }
- if ($commamode) { $result=&commaformat($result,$target); }
+ if ($dollarmode) { $result=&dollarformat($result,$target); }
+ elsif ($commamode) { $result=&commaformat($result,$target); }
}
return $result;
}