Merge pull request #27293 from edx/ciduarte/AA-721

feat: add letter grade to MFE Progress Tab API
This commit is contained in:
Carla Duarte
2021-04-09 10:22:01 -04:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ class CourseGradeSerializer(serializers.Serializer):
"""
Serializer for course grade
"""
letter_grade = serializers.CharField()
percent = serializers.FloatField()
is_passing = serializers.BooleanField(source='passed')

View File

@@ -49,8 +49,10 @@ class ProgressTabView(RetrieveAPIView):
incomplete_count: (float) number of incomplete units
locked_count: (float) number of units where contains_gated_content is True
course_grade: Object containing the following fields:
percent: (float) the user's total graded percent in the course
is_passing: (bool) whether the user's grade is above the passing grade cutoff
letter_grade: (str) the user's letter grade based on the set grade range.
If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none
percent: (float) the user's total graded percent in the course
section_scores: List of serialized Chapters. Each Chapter has the following fields:
display_name: (str) a str of what the name of the Chapter is for displaying on the site
subsections: List of serialized Subsections, each has the following fields: