--- loncom/homework/templates/CustomResponse.problem 2007/03/30 20:10:09 1.2 +++ loncom/homework/templates/CustomResponse.problem 2010/08/20 03:52:20 1.2.8.1 @@ -7,7 +7,7 @@ if ($submission=~/\,/) { return 'EXTRA_A # 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'; }