Commit a9a330a0 by Douglas Hall

Merge pull request #11021 from StraNNiKK/LTI-9

LTI-9 - Bug with sending back grades for a non-leaf blocks on devstack
parents 058a7e84 57a9839e
...@@ -616,7 +616,9 @@ def _progress_summary(student, request, course, field_data_cache=None, scores_cl ...@@ -616,7 +616,9 @@ def _progress_summary(student, request, course, field_data_cache=None, scores_cl
for module_descriptor in yield_dynamic_descriptor_descendants( for module_descriptor in yield_dynamic_descriptor_descendants(
section_module, student.id, module_creator section_module, student.id, module_creator
): ):
locations_to_children[module_descriptor.parent].append(module_descriptor.location) location_parent = module_descriptor.parent.replace(version=None, branch=None)
location_to_save = module_descriptor.location.replace(version=None, branch=None)
locations_to_children[location_parent].append(location_to_save)
(correct, total) = get_score( (correct, total) = get_score(
student, student,
module_descriptor, module_descriptor,
...@@ -637,7 +639,7 @@ def _progress_summary(student, request, course, field_data_cache=None, scores_cl ...@@ -637,7 +639,7 @@ def _progress_summary(student, request, course, field_data_cache=None, scores_cl
) )
scores.append(weighted_location_score) scores.append(weighted_location_score)
locations_to_weighted_scores[module_descriptor.location] = weighted_location_score locations_to_weighted_scores[location_to_save] = weighted_location_score
scores.reverse() scores.reverse()
section_total, _ = graders.aggregate_scores( section_total, _ = graders.aggregate_scores(
......
...@@ -980,7 +980,7 @@ class ScoresClient(object): ...@@ -980,7 +980,7 @@ class ScoresClient(object):
"Tried to fetch location {} from ScoresClient before fetch_scores() has run." "Tried to fetch location {} from ScoresClient before fetch_scores() has run."
.format(location) .format(location)
) )
return self._locations_to_scores.get(location) return self._locations_to_scores.get(location.replace(version=None, branch=None))
@classmethod @classmethod
def from_field_data_cache(cls, fd_cache): def from_field_data_cache(cls, fd_cache):
......
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