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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 05 Jul 2006 19:01:44 -0000


albertel		Wed Jul  5 15:01:44 2006 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - formula fixups should only be applied when it's a formula BUG#4910
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.108 loncom/homework/default_homework.lcpm:1.109
--- loncom/homework/default_homework.lcpm:1.108	Fri Jun 30 17:24:27 2006
+++ loncom/homework/default_homework.lcpm	Wed Jul  5 15:01:44 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.108 2006/06/30 21:24:27 www Exp $
+# $Id: default_homework.lcpm,v 1.109 2006/07/05 19:01:44 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -154,7 +154,11 @@
     if ($type eq '9') {
       $result = &maxima_check(&maxima_cas_formula_fix($response),&maxima_cas_formula_fix($answer),\$reterror);
     } else {
-       $result = &caparesponse_capa_check_answer(&capa_formula_fix($response),&capa_formula_fix($answer),$type,
+	if ($type eq '8') { # fml type
+	    $response = &capa_formula_fix($response);
+	    $answer   = &capa_formula_fix($answer);
+	}
+       $result = &caparesponse_capa_check_answer($response,$answer,$type,
 						 $tol_type,$tol,
 						 $sig_lbound,$sig_ubound,
 						 $ans_fmt,$unit,$calc,$id_list,