Commit 2653e963 by Alexander Kryklia

Should not raise exception on empty answer.

parent ce2c067d
...@@ -949,8 +949,6 @@ class NumericalResponse(LoncapaResponse): ...@@ -949,8 +949,6 @@ class NumericalResponse(LoncapaResponse):
if self.range_tolerance: if self.range_tolerance:
if isinstance(student_float, complex): if isinstance(student_float, complex):
raise StudentInputError(_(u"You may not use complex numbers in range tolerance problems")) raise StudentInputError(_(u"You may not use complex numbers in range tolerance problems"))
if isnan(student_float):
raise general_exception
boundaries = [] boundaries = []
for inclusion, answer in zip(self.inclusion, self.answer_range): for inclusion, answer in zip(self.inclusion, self.answer_range):
boundary = self.get_staff_ans(answer) boundary = self.get_staff_ans(answer)
......
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