From 60b94c04c5416a77a6296be59df7a733da5e2240 Mon Sep 17 00:00:00 2001 From: qtw97 Date: Mon, 13 Nov 2023 20:28:12 -0500 Subject: [PATCH 01/63] course discovery --- lms/djangoapps/courseware/views/views.py | 14 +++++++------- lms/envs/devstack.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index 79d2976d2c97..0ece88777360 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -276,14 +276,14 @@ def courses(request): """ courses_list = [] course_discovery_meanings = getattr(settings, 'COURSE_DISCOVERY_MEANINGS', {}) - if not settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'): - courses_list = get_courses(request.user) + # if not settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'): + courses_list = get_courses(request.user) - if configuration_helpers.get_value("ENABLE_COURSE_SORTING_BY_START_DATE", - settings.FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"]): - courses_list = sort_by_start_date(courses_list) - else: - courses_list = sort_by_announcement(courses_list) + if configuration_helpers.get_value("ENABLE_COURSE_SORTING_BY_START_DATE", + settings.FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"]): + courses_list = sort_by_start_date(courses_list) + else: + courses_list = sort_by_announcement(courses_list) # Add marketable programs to the context. programs_list = get_programs_with_type(request.site, include_hidden=False) diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index c2454ee71fc2..e342dac0af0b 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -36,7 +36,7 @@ # When the celery task is run eagerly, it is executed locally while sharing the # thread and its request cache with the active Django Request. In that case, # do not clear the cache. -CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION = False +CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION = True HTTPS = 'off' LMS_ROOT_URL = f'http://{LMS_BASE}' @@ -198,7 +198,7 @@ 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 From 42d65a00d35d2128a5e709d9b09cc476eccf165a Mon Sep 17 00:00:00 2001 From: qtw97 Date: Tue, 14 Nov 2023 15:34:13 -0500 Subject: [PATCH 02/63] Update courses.html --- lms/templates/courseware/courses.html | 185 +++++++++++++++++++++++++- 1 file changed, 184 insertions(+), 1 deletion(-) diff --git a/lms/templates/courseware/courses.html b/lms/templates/courseware/courses.html index db303073676d..d127457527c8 100644 --- a/lms/templates/courseware/courses.html +++ b/lms/templates/courseware/courses.html @@ -35,7 +35,7 @@
% if course_discovery_enabled: - +
+
+
- +
+
+
+ - +
+
- -
- +
@@ -91,6 +94,13 @@ font-family: 'Inter', sans-serif; } + .magnifier-input{ + display: flex; + flex-direction: row; + align-items: stretch; + + } + .wrapper-search-context { display: flex; flex-direction: column; @@ -154,7 +164,7 @@ .search-container { box-sizing: border-box; display: flex; - flex-direction: column; + flex-direction: row; align-items: flex-start; padding: 12px 18px; gap: 10px; From c6bff93011d5d3adc3263a2524184a4d4c07ae88 Mon Sep 17 00:00:00 2001 From: qtw97 Date: Tue, 14 Nov 2023 19:19:44 -0500 Subject: [PATCH 07/63] Update courses.html --- lms/templates/courseware/courses.html | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lms/templates/courseware/courses.html b/lms/templates/courseware/courses.html index f5c3ec500960..e2d4778d6a96 100644 --- a/lms/templates/courseware/courses.html +++ b/lms/templates/courseware/courses.html @@ -35,7 +35,7 @@
% if course_discovery_enabled: - +
@@ -60,15 +60,16 @@
+ Search Icon + - Search Icon
- + ${_('Loading')}
@@ -77,9 +78,21 @@
+ + +
+ Sort by: + +
+ + + +