Commit 96c132b3 by ichuang

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

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