[LON-CAPA-cvs] cvs: loncom /homework lonmaxima.pm

www lon-capa-cvs-allow@mail.lon-capa.org
Tue, 10 Jun 2008 13:31:40 -0000


www		Tue Jun 10 09:31:40 2008 EDT

  Modified files:              
    /loncom/homework	lonmaxima.pm 
  Log:
  Need to catch incorrect syntax in <formularesponse>, so students do not get
  charged a try.
  
  
Index: loncom/homework/lonmaxima.pm
diff -u loncom/homework/lonmaxima.pm:1.21 loncom/homework/lonmaxima.pm:1.22
--- loncom/homework/lonmaxima.pm:1.21	Tue Aug 14 17:54:54 2007
+++ loncom/homework/lonmaxima.pm	Tue Jun 10 09:31:38 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Interface routines to MAXIMA CAS
 #
-# $Id: lonmaxima.pm,v 1.21 2007/08/14 21:54:54 riegler Exp $
+# $Id: lonmaxima.pm,v 1.22 2008/06/10 13:31:38 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -139,6 +139,8 @@
     # integer to string mappings come from capaParser.h
     # 1 maps to 'EXACT_ANS'
     if ($reply eq 'true') { return 1; }
+    # 11 maps to 'BAD_FORMULA'
+    if ($reply=~/^Error\:/) { return 11; }
     # 7 maps to 'INCORRECT'
     return 7;
 }