From ed69cb554bd251c0f4e1921bd7adf8a8ba0eb411 Mon Sep 17 00:00:00 2001 From: Serhii Nanai Date: Wed, 3 Sep 2025 12:38:08 +0300 Subject: [PATCH] fix: remove unused fields 'prerequisites', 'ocw_links' --- openedx/core/djangoapps/courseware_api/serializers.py | 10 ---------- openedx/core/djangoapps/courseware_api/views.py | 9 --------- 2 files changed, 19 deletions(-) diff --git a/openedx/core/djangoapps/courseware_api/serializers.py b/openedx/core/djangoapps/courseware_api/serializers.py index ee6689a780..d24e89cec4 100644 --- a/openedx/core/djangoapps/courseware_api/serializers.py +++ b/openedx/core/djangoapps/courseware_api/serializers.py @@ -159,16 +159,6 @@ class CourseInfoSerializer(serializers.Serializer): # pylint: disable=abstract- allow_null=True, default=None, ) - ocw_links = serializers.ListField( - child=serializers.CharField(), - allow_empty=True, - default=list, - ) - prerequisites = serializers.ListField( - child=serializers.CharField(), - allow_empty=True, - default=list, - ) def __init__(self, *args, **kwargs): """ diff --git a/openedx/core/djangoapps/courseware_api/views.py b/openedx/core/djangoapps/courseware_api/views.py index fcc5b09a6c..3261885ce3 100644 --- a/openedx/core/djangoapps/courseware_api/views.py +++ b/openedx/core/djangoapps/courseware_api/views.py @@ -519,13 +519,6 @@ class CoursewareMeta: """ return get_course_about_section(self.request, self.course, "overview") - @property - def ocw_links(self): - """ - Returns a list of OpenCourseWare links for the course. - """ - return get_course_about_section(self.request, self.course, "ocw_links") - @method_decorator(transaction.non_atomic_requests, name='dispatch') class CoursewareInformation(RetrieveAPIView): @@ -654,8 +647,6 @@ class CoursewareInformation(RetrieveAPIView): * visible: Boolean indicating whether notes are visible in the course * marketing_url: The marketing URL for the course * overview: The overview HTML content for the course - * ocw_links: A list of OpenCourseWare links for the course - * prerequisites: A list of prerequisite courses for the course * license: The license for the course **Parameters:**