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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 27 Jul 2006 22:56:38 -0000


albertel		Thu Jul 27 18:56:38 2006 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - an attempt at bug#4939
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.113 loncom/homework/default_homework.lcpm:1.114
--- loncom/homework/default_homework.lcpm:1.113	Tue Jul 18 13:14:10 2006
+++ loncom/homework/default_homework.lcpm	Thu Jul 27 18:56:37 2006
@@ -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.113 2006/07/18 17:14:10 www Exp $
+# $Id: default_homework.lcpm,v 1.114 2006/07/27 22:56:37 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -206,8 +206,8 @@
 # 3x10^8 -> 3&8; 3*10^-8 -> 3&-8
     $expression=~s/(\d+)(?:x|\*)10(?:\^|\*\*)([\+\-]*\d+)/$1\&\($2\)/gsi;
 # Fill in multiplication signs
-# a b -> a*b
-    $expression=~s/\s+/\*/gs;
+# a b -> a*b;3 b -> 3*b;3 4 -> 3*4
+    $expression=~s/(\w)\s+(\w)/$1\*$2/gs;
 # 3a -> 3*a; 3( -> 3*(; 3A -> 3*a
     $expression=~s/(\d)([a-zA-Z\(])/$1\*$2/gs;
 # a3 -> a*3;