Commit ea4e76b0 by Calen Pennington

Merge pull request #4254 from marcore/fix-branding-course-listing-opaque

Fix filter with new opaque key, allowing user to set COURSE_LISTING as o...
parents 44c41020 a3d52557
...@@ -2,9 +2,9 @@ from xmodule.modulestore.django import modulestore ...@@ -2,9 +2,9 @@ from xmodule.modulestore.django import modulestore
from xmodule.course_module import CourseDescriptor from xmodule.course_module import CourseDescriptor
from django.conf import settings from django.conf import settings
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from microsite_configuration import microsite from microsite_configuration import microsite
def get_visible_courses(): def get_visible_courses():
""" """
Return the set of CourseDescriptors that should be visible in this branded instance Return the set of CourseDescriptors that should be visible in this branded instance
...@@ -22,7 +22,7 @@ def get_visible_courses(): ...@@ -22,7 +22,7 @@ def get_visible_courses():
# this is legacy format which is outside of the microsite feature -- also handle dev case, which should not filter # this is legacy format which is outside of the microsite feature -- also handle dev case, which should not filter
if hasattr(settings, 'COURSE_LISTINGS') and subdomain in settings.COURSE_LISTINGS and not settings.DEBUG: if hasattr(settings, 'COURSE_LISTINGS') and subdomain in settings.COURSE_LISTINGS and not settings.DEBUG:
filtered_visible_ids = frozenset(settings.COURSE_LISTINGS[subdomain]) filtered_visible_ids = frozenset([SlashSeparatedCourseKey.from_deprecated_string(c) for c in settings.COURSE_LISTINGS[subdomain]])
filtered_by_org = microsite.get_value('course_org_filter') filtered_by_org = microsite.get_value('course_org_filter')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment