Commit ba1466ca by Martyn James Committed by Jonathan Piacenti

Solves problem when course components have non-numeric values for grade-weight

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