[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /homework/templates CustomResponse.problem

raeburn raeburn@source.lon-capa.org
Fri, 20 Aug 2010 03:52:20 -0000


raeburn		Fri Aug 20 03:52:20 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/homework/templates	CustomResponse.problem 
  Log:
  - Backport 1.4.
  
  
Index: loncom/homework/templates/CustomResponse.problem
diff -u loncom/homework/templates/CustomResponse.problem:1.2 loncom/homework/templates/CustomResponse.problem:1.2.8.1
--- loncom/homework/templates/CustomResponse.problem:1.2	Fri Mar 30 20:10:09 2007
+++ loncom/homework/templates/CustomResponse.problem	Fri Aug 20 03:52:20 2010
@@ -7,7 +7,7 @@
 # No units needed
 if ($submission=~/^\d+\s+\w+$/) { return 'UNIT_NOTNEEDED'; }
 # Need a numerical answer here
-if ($submission!~/^\d+$/) { return 'WANTED_NUMERIC'; }
+if ($submission!~/^[\d\.\-]+$/) { return 'WANTED_NUMERIC'; }
 $difference=abs(90-abs($submission));
 if ($difference==0) { return 'EXACT_ANS'; }
 if ($difference < 0.001) { return 'APPROX_ANS'; }