From cf2c5cba4fe9a2ff43a40c9a9e7148bee88a53bf Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Wed, 20 Jun 2012 17:20:34 -0400 Subject: [PATCH] bugfix: lcp score can apparently be 0/0 --- common/lib/xmodule/capa_module.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/capa_module.py b/common/lib/xmodule/capa_module.py index 2d21f14d1e..3566f9b5e3 100644 --- a/common/lib/xmodule/capa_module.py +++ b/common/lib/xmodule/capa_module.py @@ -101,7 +101,9 @@ class Module(XModule): d = self.get_score() score = d['score'] total = d['total'] - return Progress(score, total) + if total > 0: + return Progress(score, total) + return None def get_html(self):