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:
Michael Terry
2022-02-17 12:18:36 -05:00
parent e81c4fe49d
commit 10ce36ea14
2 changed files with 2 additions and 2 deletions

View File

@@ -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):
"""

View File

@@ -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.