diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index 79d2976d2c97..568d55057679 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -276,7 +276,7 @@ def courses(request): """ courses_list = [] course_discovery_meanings = getattr(settings, 'COURSE_DISCOVERY_MEANINGS', {}) - if not settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'): + if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'): courses_list = get_courses(request.user) if configuration_helpers.get_value("ENABLE_COURSE_SORTING_BY_START_DATE", diff --git a/lms/envs/common.py b/lms/envs/common.py index c0182d47355a..91f2b8386fd6 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -657,7 +657,7 @@ # .. toggle_target_removal_date: None # .. toggle_warning: The COURSE_DISCOVERY_MEANINGS setting should be properly defined. # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7845 - 'ENABLE_COURSE_DISCOVERY': False, + 'ENABLE_COURSE_DISCOVERY': True, # .. toggle_name: FEATURES['ENABLE_COURSE_FILENAME_CCX_SUFFIX'] # .. toggle_implementation: DjangoSetting @@ -679,6 +679,12 @@ # Teams feature 'ENABLE_TEAMS': True, + # Filter feature of the filter bar + 'ENABLE_FILTER': False, + + # Sort by feature of the filter bar + 'ENABLE_SORTBY': False, + # Show video bumper in LMS 'ENABLE_VIDEO_BUMPER': False, diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index c2454ee71fc2..13f5432c092b 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -198,12 +198,17 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing 'language': LANGUAGE_MAP, } -FEATURES['ENABLE_COURSE_DISCOVERY'] = False +FEATURES['ENABLE_COURSE_DISCOVERY'] = True # Setting for overriding default filtering facets for Course discovery # COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"] FEATURES['COURSES_ARE_BROWSEABLE'] = True HOMEPAGE_COURSE_MAX = 9 +FEATURES['ENABLE_FILTER'] = True +# Toggle for the "filter" feature of the search bar +FEATURES['ENABLE_SORTBY'] = False +# Toggle for the "sort by" feature of the search bar + # Software secure fake page feature flag FEATURES['ENABLE_SOFTWARE_SECURE_FAKE'] = True diff --git a/lms/templates/courseware/courses.html b/lms/templates/courseware/courses.html index db303073676d..eed7797fe5a2 100644 --- a/lms/templates/courseware/courses.html +++ b/lms/templates/courseware/courses.html @@ -7,6 +7,8 @@ <%inherit file="../main.html" /> <% course_discovery_enabled = settings.FEATURES.get('ENABLE_COURSE_DISCOVERY') + filter_enabled = settings.FEATURES.get('ENABLE_FILTER') + sortby_enabled = settings.FEATURES.get('ENABLE_SORTBY') %> <%namespace name='static' file='../static_content.html'/> @@ -29,52 +31,355 @@ % endif + <%block name="pagetitle">${_("Courses")}
-
-
- % if course_discovery_enabled: +
+
+ % if course_discovery_enabled: +
+ % endif + + +
+
+
+
+ + + + +
+ ${_('Loading')} +
+
+
+
+
+ +
+ + % if sortby_enabled: + +
+ Sort by: + +
+ % endif + + + - - % endif -
-
    - %for course in courses: -
  • - <%include file="../course.html" args="course=course" /> -
  • - %endfor -
+
+
+ + + + + % endif + + + + + + + +
+
    + %for course in courses: +
  • + <%include file="../course.html" args="course=course" /> +
  • + %endfor +
+
+ + % if course_discovery_enabled: + % endif -
+ +
-
+ + \ No newline at end of file