Commit d30203ba by ichuang

put try around Progress call in capa_module - exception when divide by zero

parent 6bfd5f4c
......@@ -109,7 +109,12 @@ class Module(XModule):
score = d['score']
total = d['total']
if total > 0:
return Progress(score, total)
try:
return Progress(score, total)
except Exception as err:
if self.DEBUG:
return None
raise
return None
......
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