Commit 6f03ebb1 by kimth

Add message for student in CustomResponse error

parent 3de7c3a3
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment