Skip to content

✨(search) add offer and certificate offer course filters - #2867

Draft
Tiago-Salles wants to merge 1 commit into
openfun:masterfrom
Tiago-Salles:Tiago-Salles/issues/2451-course-offer-search-filters
Draft

Tiago-Salles wants to merge 1 commit into
openfun:masterfrom
Tiago-Salles:Tiago-Salles/issues/2451-course-offer-search-filters

Conversation

@Tiago-Salles

Copy link
Copy Markdown
Collaborator

Purpose

Add course search filters on the offer and certificate_offer fields of course runs, so learners can filter courses by how they are sold (free, partially free, subscription, paid) and by how the certificate is obtained. Part of #2451.

Proposal

  • Add OfferFilterDefinition and CertificateOfferFilterDefinition, nested under course_runs like the availability and languages filters
  • Enable both in the default filters configuration and append them to the default presentation, keeping existing filter positions unchanged
  • Fix facet key matching to use the filter name as a prefix, since the substring match made offer collect the certificate_offer buckets
  • Add tests for each offer value, multiple offers, invalid values, the certificate offer and facet counts across nested filters
  • Update the filters customization docs, changelog and upgrade notes

Translations for the new filter titles are left to Crowdin, as for previous filters.

Add two built-in filter definitions on the `course_runs` nested field:
`OfferFilterDefinition` (free, partially free, subscription, paid) and
`CertificateOfferFilterDefinition` (free, subscription, paid). They are
enabled in the default filters configuration and appended to the default
filters presentation, so existing filter positions are unchanged. Selected
values are combined in a single terms query so choosing several offers
matches course runs having any of them.

Facet keys were matched by substring, which made the `offer` filter also
collect the `certificate_offer@...` buckets. Match on the prefix instead.

Tests cover each offer value, multiple offers, invalid values, the
certificate offer and facet counts across nested filters. Documentation,
changelog and upgrade notes are updated.
@Tiago-Salles
Tiago-Salles force-pushed the Tiago-Salles/issues/2451-course-offer-search-filters branch from b32f7f7 to 11738ba Compare October 25, 2026 23:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant