Commit bb6a9ec9 by Eric Fischer

Fix bug in grade retrieval

self.locations_to_children was updated to be a function rather than a dict,
and this reference to the object was not updated accordingly.
parent abd9920e
......@@ -71,7 +71,7 @@ class ProgressSummary(object):
if location in self.weighted_scores:
score = self.weighted_scores[location]
return score.earned, score.possible
children = self.locations_to_children[location]
children = self.locations_to_children(location)
earned = 0.0
possible = 0.0
for child in children:
......
......@@ -226,8 +226,9 @@ class TestProgressSummary(TestCase):
self.loc_k: [],
self.loc_m: [],
}
locations_function = lambda location: locations_to_scored_children[location]
self.progress_summary = ProgressSummary(
None, weighted_scores, locations_to_scored_children
None, weighted_scores, locations_function
)
def create_score(self, earned, possible):
......
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