From 6bda334b99f2a72b29d425f531c891acfe99bee8 Mon Sep 17 00:00:00 2001 From: "J. Cliff Dyer" Date: Thu, 1 Sep 2016 15:56:17 +0000 Subject: [PATCH] Handle scoreable blocks without defined weight Default weight to 1.0. TNL-5410 --- lms/djangoapps/grades/new/subsection_grade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/grades/new/subsection_grade.py b/lms/djangoapps/grades/new/subsection_grade.py index 8d56fcac1b..1ff46d4b40 100644 --- a/lms/djangoapps/grades/new/subsection_grade.py +++ b/lms/djangoapps/grades/new/subsection_grade.py @@ -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)