From 6f03ebb198af88cb1cf57f16a880897646dada3e Mon Sep 17 00:00:00 2001 From: kimth Date: Sat, 1 Sep 2012 08:26:54 -0400 Subject: [PATCH] Add message for student in CustomResponse error --- common/lib/capa/capa/responsetypes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index d1b58e53a9..13a0bec3a2 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -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