Skip to content

Commit

Permalink
Merge pull request openedx#29945 from openedx/mikix/hide-old-mongo
Browse files Browse the repository at this point in the history
feat: hide Old Mongo courses from catalog
  • Loading branch information
mikix authored Feb 17, 2022
2 parents e1acd52 + 10ce36e commit 203e2e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lms/djangoapps/course_api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_hidden(self, course_overview):
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):
"""
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/course_api/tests/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def setUp(self):
'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.
Expand Down

0 comments on commit 203e2e9

Please sign in to comment.