fixed default tolerance on numericalresponse

This commit is contained in:
Lyla Fischer
2012-10-11 11:59:27 -04:00
parent 88f147c704
commit 331f35145f

View File

@@ -746,7 +746,7 @@ class NumericalResponse(LoncapaResponse):
id=xml.get('id'))[0]
self.tolerance = contextualize_text(self.tolerance_xml, context)
except Exception:
self.tolerance = 0
self.tolerance = '0'
try:
self.answer_id = xml.xpath('//*[@id=$id]//textline/@id',
id=xml.get('id'))[0]