Commit 2ec95262 by J. Cliff Dyer

Handle null weighted_possible values safely.

Rather than failing, treat them as unscored blocks.

[TNL-5689](https://openedx.atlassian.net/browse/TNL-5689): Server error when
checking a problem.
parent e3db08f1
......@@ -108,8 +108,7 @@ def get_score(submissions_scores, csm_scores, persisted_block, block):
_get_score_from_persisted_or_latest_block(persisted_block, block, weight)
)
assert weighted_possible is not None
has_valid_denominator = weighted_possible > 0.0
has_valid_denominator = weighted_possible is not None and weighted_possible > 0.0
graded = _get_graded_from_block(persisted_block, block) if has_valid_denominator else False
return ProblemScore(
......
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