Commit 30f3923c by David Ormsbee

Quick patch to regression causing partial credit to break on 6.00x

parent c1846134
...@@ -115,11 +115,13 @@ class CorrectMap(object): ...@@ -115,11 +115,13 @@ class CorrectMap(object):
If the answer is correct, return the assigned If the answer is correct, return the assigned
number of points (default: 1 point) number of points (default: 1 point)
Otherwise, return 0 points """ Otherwise, return 0 points """
if self.is_correct(answer_id): npoints = self.get_property(answer_id, 'npoints')
npoints = self.get_property(answer_id, 'npoints') if npoints is not None:
return npoints if npoints is not None else 1 return npoints
else: elif self.is_correct(answer_id):
return 0 return 1
# if not correct and no points have been assigned, return 0
return 0
def set_property(self, answer_id, property, value): def set_property(self, answer_id, property, value):
if answer_id in self.cmap: if answer_id in self.cmap:
......
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