Skip to content

Commit

Permalink
fix: Add missing field
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulkark committed Sep 18, 2023
1 parent 98a0bf2 commit 2a5b540
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions cms/djangoapps/contentstore/rest_api/v1/serializers.py
Original file line number Diff line number Diff line change
@@ -118,6 +118,7 @@ class CourseDetailsSerializer(serializers.Serializer):
video_thumbnail_image_asset_path = serializers.CharField()
video_thumbnail_image_name = serializers.CharField(allow_blank=True)


class PossiblePreRequisiteCourseSerializer(serializers.Serializer):
""" Serializer for possible pre requisite course """
course_key = CourseKeyField()
1 change: 1 addition & 0 deletions cms/djangoapps/contentstore/rest_api/v1/views.py
Original file line number Diff line number Diff line change
@@ -481,6 +481,7 @@ def put(self, request: Request, course_id: str):
serializer = CourseDetailsSerializer(updated_data)
return Response(serializer.data)


@view_auth_classes(is_authenticated=True)
class CourseSettingsView(DeveloperErrorViewMixin, APIView):
"""
6 changes: 6 additions & 0 deletions cms/djangoapps/contentstore/utils.py
Original file line number Diff line number Diff line change
@@ -881,6 +881,11 @@ def get_course_settings(request, course_key, course_block):
verified_mode = CourseMode.verified_mode_for_course(course_key, include_expired=True)
upgrade_deadline = (verified_mode and verified_mode.expiration_datetime and
verified_mode.expiration_datetime.isoformat())
date_placeholder_format = configuration_helpers.get_value_for_org(
course_block.location.org,
'SCHEDULE_DETAIL_FORMAT',
settings.SCHEDULE_DETAIL_FORMAT
).upper()
settings_context = {
'context_course': course_block,
'course_locator': course_key,
@@ -905,6 +910,7 @@ def get_course_settings(request, course_key, course_block):
'enable_extended_course_details': enable_extended_course_details,
'upgrade_deadline': upgrade_deadline,
'mfe_proctored_exam_settings_url': get_proctored_exam_settings_url(course_block.id),
'date_placeholder_format': date_placeholder_format,
}
if is_prerequisite_courses_enabled():
courses, in_process_course_actions = get_courses_accessible_to_user(request)

0 comments on commit 2a5b540

Please sign in to comment.