Add message for student in CustomResponse error

This commit is contained in:
kimth
2012-09-01 08:26:54 -04:00
parent 3de7c3a322
commit 6f03ebb198

View File

@@ -726,7 +726,7 @@ class NumericalResponse(LoncapaResponse):
# I think this is just pyparsing.ParseException, calc.UndefinedVariable:
# But we'd need to confirm
except:
raise StudentInputError("Invalid input: could not parse '%s' as a number" %\
raise StudentInputError("Invalid input: could not interpret '%s' as a number" %\
cgi.escape(student_answer))
if correct:
@@ -920,6 +920,7 @@ def sympy_check2():
print "oops in customresponse (code) error %s" % err
print "context = ", self.context
print traceback.format_exc()
raise StudentInputError("Error: Problem could not be evaluated with your input") # Notify student
else: # self.code is not a string; assume its a function
# this is an interface to the Tutor2 check functions