feat: Adds disable_progress_graph attribute to the returned course_metadata response
Currently, https://github.com/openedx/frontend-app-course-authoring/issues/517 faces an issue when the progress graph toggle is enabled/disabled but the settings are not respected, the disable_progress_graph attribute will allow the frontend-app-learning repo to use this attribute to respect the settings authored from frontend-app-course-authoring and ultimately fix https://github.com/openedx/frontend-app-course-authoring/issues/517.
This commit is contained in:
committed by
Navin Karkera
parent
254903531a
commit
b14396bbfb
@@ -145,3 +145,4 @@ class ProgressTabSerializer(VerifiedModeSerializer):
|
||||
username = serializers.CharField()
|
||||
user_has_passing_grade = serializers.BooleanField()
|
||||
verification_data = VerificationDataSerializer()
|
||||
disable_progress_graph = serializers.BooleanField()
|
||||
|
||||
@@ -230,6 +230,7 @@ class ProgressTabView(RetrieveAPIView):
|
||||
|
||||
block = modulestore().get_course(course_key)
|
||||
grading_policy = block.grading_policy
|
||||
disable_progress_graph = block.disable_progress_graph
|
||||
verification_status = IDVerificationService.user_status(student)
|
||||
verification_link = None
|
||||
if verification_status['status'] is None or verification_status['status'] == 'expired':
|
||||
@@ -259,6 +260,7 @@ class ProgressTabView(RetrieveAPIView):
|
||||
'username': username,
|
||||
'user_has_passing_grade': user_has_passing_grade,
|
||||
'verification_data': verification_data,
|
||||
'disable_progress_graph': disable_progress_graph,
|
||||
}
|
||||
context = self.get_serializer_context()
|
||||
context['staff_access'] = is_staff
|
||||
|
||||
Reference in New Issue
Block a user