feat: hide Old Mongo courses from catalog
This is step one of removing access altogether. But first, let's not advertise them. DEPR-58 DEPR-123
This commit is contained in:
@@ -123,7 +123,7 @@ class CourseSerializer(serializers.Serializer): # pylint: disable=abstract-meth
|
||||
Represents whether course is hidden in LMS
|
||||
"""
|
||||
catalog_visibility = course_overview.catalog_visibility
|
||||
return catalog_visibility in ['about', 'none']
|
||||
return catalog_visibility in ['about', 'none'] or course_overview.id.deprecated # Old Mongo should be hidden
|
||||
|
||||
def get_blocks_url(self, course_overview):
|
||||
"""
|
||||
|
||||
@@ -78,7 +78,7 @@ class TestCourseSerializer(CourseApiFactoryMixin, ModuleStoreTestCase):
|
||||
'effort': '6 hours',
|
||||
'pacing': 'instructor',
|
||||
'mobile_available': True,
|
||||
'hidden': False,
|
||||
'hidden': True, # because it's an old mongo course
|
||||
'invitation_only': False,
|
||||
|
||||
# 'course_id' is a deprecated field, please use 'id' instead.
|
||||
|
||||
Reference in New Issue
Block a user