From e8bfee28c55991433a3abbecf1ffdddf8d899ede Mon Sep 17 00:00:00 2001 From: Carla Duarte Date: Wed, 24 Mar 2021 13:55:56 -0400 Subject: [PATCH] AA-722: surface num_droppable assignments in MFE Progress Tab API --- lms/djangoapps/course_home_api/progress/v1/serializers.py | 1 + lms/djangoapps/course_home_api/progress/v1/views.py | 1 + 2 files changed, 2 insertions(+) diff --git a/lms/djangoapps/course_home_api/progress/v1/serializers.py b/lms/djangoapps/course_home_api/progress/v1/serializers.py index d08f3b7588..18f2f615af 100644 --- a/lms/djangoapps/course_home_api/progress/v1/serializers.py +++ b/lms/djangoapps/course_home_api/progress/v1/serializers.py @@ -53,6 +53,7 @@ class GradingPolicySerializer(serializers.Serializer): def get_assignment_policies(self, grading_policy): return [{ + 'num_droppable': assignment_policy['drop_count'], 'type': assignment_policy['type'], 'weight': assignment_policy['weight'], } for assignment_policy in grading_policy['GRADER']] diff --git a/lms/djangoapps/course_home_api/progress/v1/views.py b/lms/djangoapps/course_home_api/progress/v1/views.py index 237dfcc254..5429acef25 100644 --- a/lms/djangoapps/course_home_api/progress/v1/views.py +++ b/lms/djangoapps/course_home_api/progress/v1/views.py @@ -68,6 +68,7 @@ class ProgressTabView(RetrieveAPIView): enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) grading_policy: assignment_policies: List of serialized assignment grading policy objects, each has the following fields: + num_droppable: (int) the number of assignments able to be dropped type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they