Show latest courses first

Hello,

I am trying to make the courses at both the “/” and “/courses” endpoint appear sorted by start date, with the latest courses appearing first. According to the documentation, this should be controlled by the “ENABLE_COURSE_SORTING_BY_START_DATE” feature toggle. This is set to True in my configuration, i.e.:

running:
cat $(tutor config printroot)/env/apps/openedx/settings/lms/production.py | grep SORTING

outputs:
FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"] = True

However, the oldest courses appear first. You can see the behavior at: https://courses.africancitieslab.org/

How can I get the latest courses to appear first?

In case it is of any help, the “discovery” plugin (v15.0.0) is active and running:

cat $(tutor config printroot)/env/apps/openedx/settings/lms/production.py | grep COURSE

outputs:

COURSE_CATALOG_VISIBILITY_PERMISSION = "see_in_catalog"
COURSE_ABOUT_VISIBILITY_PERMISSION = "see_about_page"
FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"] = True
FEATURES["ALLOW_COURSE_STAFF_GRADE_DOWNLOADS"] = True
FEATURES["ENABLE_COURSE_DISCOVERY"] = True

Hi @martibosch,
Recently, a pull request was merged in edx-search (PR #205) and released in a new version.
With this update, the setting:

ENABLE_COURSE_SORTING_BY_START_DATE = True

now works for both:

  • Course templates pages

  • Discovery (catalog) pages

Previously, the sorting by start date was only applied on the Course templates pages, but not on the Discovery (catalog) pages. With the latest release of edx-search, the functionality is consistent across both views.