Commit 6454290f by Martyn James Committed by Jonathan Piacenti

Tweak to allow for case when weight is explicity None

parent ba1466ca
......@@ -502,8 +502,9 @@ def get_score(course_id, user, problem_descriptor, module_creator, scores_cache=
return (None, None)
# Now we re-weight the problem, if specified
weight = float(problem_descriptor.weight)
weight = problem_descriptor.weight
if weight is not None:
weight = float(weight)
if total == 0:
log.exception("Cannot reweight a problem with zero total points. Problem: " + str(student_module))
return (correct, total)
......
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