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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 27 May 2004 03:46:02 -0000


albertel		Wed May 26 23:46:02 2004 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - BUG#2535, ignore commas in numerical answers
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.82 loncom/homework/default_homework.lcpm:1.83
--- loncom/homework/default_homework.lcpm:1.82	Wed May 26 23:44:18 2004
+++ loncom/homework/default_homework.lcpm	Wed May 26 23:46:02 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.82 2004/05/27 03:44:18 albertel Exp $
+# $Id: default_homework.lcpm,v 1.83 2004/05/27 03:46:02 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -69,6 +69,7 @@
 	$answer=~s/ +/ /g;
 	$response=~s/ +/ /g;
     }
+    if ($type eq 'float') { $response=~s/,//g; }
     if (length($response) > 500) { return "TOO_LONG: Answer too long"; }
 
     if ($type eq '' ) {