From 8e7dc093e0a3b44fd5568a229a0ed2ecb595e285 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Thu, 13 Apr 2017 11:42:49 -0400 Subject: [PATCH] chapter_grades should be ordered --- lms/djangoapps/grades/new/course_grade.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/grades/new/course_grade.py b/lms/djangoapps/grades/new/course_grade.py index 0f65040c31..60c9479e79 100644 --- a/lms/djangoapps/grades/new/course_grade.py +++ b/lms/djangoapps/grades/new/course_grade.py @@ -59,10 +59,10 @@ class CourseGradeBase(object): subsection grades, display name, and url name. """ course_structure = self.course_data.structure - return { - chapter_key: self._get_chapter_grade_info(course_structure[chapter_key], course_structure) - for chapter_key in course_structure.get_children(self.course_data.location) - } + grades = OrderedDict() + for chapter_key in course_structure.get_children(self.course_data.location): + grades[chapter_key] = self._get_chapter_grade_info(course_structure[chapter_key], course_structure) + return grades @lazy def subsection_grades(self):