From 8a4d1f4810e56920e68cb37cb5f640f95bd8ee59 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Wed, 16 Oct 2024 18:29:20 +0200 Subject: [PATCH] refactor!: turn on homepage course API V2 consumption by default (#1307) * refactor!: turn on homepage course API V2 consumption by default Turn on getting courses from the HomePageCourses API which allows pagination, filtering and ordering. See https://github.com/openedx/edx-platform/pull/34173 for more details on the API implementation. * fix: home page initial a-z course sort --------- Co-authored-by: Diana Olarte --- .env | 2 +- .env.development | 2 +- src/studio-home/hooks.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index dfdf17311..b0374e540 100644 --- a/.env +++ b/.env @@ -41,7 +41,7 @@ HOTJAR_APP_ID='' HOTJAR_VERSION=6 HOTJAR_DEBUG=false INVITE_STUDENTS_EMAIL_TO='' -ENABLE_HOME_PAGE_COURSE_API_V2=false +ENABLE_HOME_PAGE_COURSE_API_V2=true ENABLE_CHECKLIST_QUALITY='' ENABLE_GRADING_METHOD_IN_PROBLEMS=false LIBRARY_MODE="v1 only" diff --git a/.env.development b/.env.development index 9d5d4b560..7d197a3b8 100644 --- a/.env.development +++ b/.env.development @@ -44,7 +44,7 @@ HOTJAR_APP_ID='' HOTJAR_VERSION=6 HOTJAR_DEBUG=true INVITE_STUDENTS_EMAIL_TO="someone@domain.com" -ENABLE_HOME_PAGE_COURSE_API_V2=false +ENABLE_HOME_PAGE_COURSE_API_V2=true ENABLE_CHECKLIST_QUALITY=true ENABLE_GRADING_METHOD_IN_PROBLEMS=false LIBRARY_MODE="mixed" diff --git a/src/studio-home/hooks.jsx b/src/studio-home/hooks.jsx index 08662810f..0e65cb31e 100644 --- a/src/studio-home/hooks.jsx +++ b/src/studio-home/hooks.jsx @@ -41,7 +41,7 @@ const useStudioHome = (isPaginated = false) => { useEffect(() => { if (isPaginated) { const firstPage = 1; - dispatch(fetchStudioHomeData(location.search ?? '', false, { page: firstPage }, true)); + dispatch(fetchStudioHomeData(location.search ?? '', false, { page: firstPage, order: 'display_name' }, true)); } }, []);