Merge pull request #13380 from edx/hotfix/tnl-5410

Handle scoreable blocks without defined weight
This commit is contained in:
Adam
2016-09-01 14:17:59 -04:00
committed by GitHub

View File

@@ -131,7 +131,7 @@ class SubsectionGrade(object):
# There's a chance that the value of weight is not the same value used when the problem was scored,
# since we can get the value from either block_structure or CSM/submissions.
weight = block.weight
weight = getattr(block, 'weight', 1.0)
if persisted_values:
possible = persisted_values.get('possible', possible)
weight = persisted_values.get('weight', weight)