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

www lon-capa-cvs-allow@mail.lon-capa.org
Wed, 05 Mar 2008 16:06:39 -0000


www		Wed Mar  5 11:06:39 2008 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  Bug #4721: don't interpret whitespace in number as part of unit
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.126 loncom/homework/default_homework.lcpm:1.127
--- loncom/homework/default_homework.lcpm:1.126	Wed Mar  5 10:31:57 2008
+++ loncom/homework/default_homework.lcpm	Wed Mar  5 11:06:39 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.126 2008/03/05 15:31:57 www Exp $
+# $Id: default_homework.lcpm,v 1.127 2008/03/05 16:06:39 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -319,7 +319,8 @@
     $unit=~s/\s//;
     if ($unit ne '') {
 	foreach my $response (@$responses) {
-	    foreach my $element (@$response) {	    
+	    foreach my $element (@$response) {	
+                $element =~ s/\s//g;    
 		$element .= " $unit";
 	    }
 	}