Skip to content

Prefer enrollable course runs for start date#3376

Open
cp-at-mit wants to merge 3 commits intomainfrom
filter-start-date-for-only-enrollable-course-runs
Open

Prefer enrollable course runs for start date#3376
cp-at-mit wants to merge 3 commits intomainfrom
filter-start-date-for-only-enrollable-course-runs

Conversation

@cp-at-mit
Copy link
Contributor

@cp-at-mit cp-at-mit commented Mar 11, 2026

What are the relevant tickets?

https://github.com/mitodl/hq/issues/10496

Description (What does it do?)

When computing the start date label for multi-run courses, prefer runs that are still open for enrollment (is_enrollable). If no enrollable runs exist, fall back to all runs. This avoids showing start dates from long-past, closed runs while preserving existing behavior for single-run courseware and still using compareCourseRunStartDates for sorting.

How can this be tested?

Create a course with two course runs, one in the past and one currently open for enrollment. Visit the catalog page and verify that the start date is for the course run that's currently open for enrollment.

When computing the start date label for multi-run courses, prefer runs that are still open for enrollment (is_enrollable). If no enrollable runs exist, fall back to all runs. This avoids showing start dates from long-past, closed runs while preserving existing behavior for single-run courseware and still using compareCourseRunStartDates for sorting.
@github-actions
Copy link

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:


## Changes for v1.yaml:


## Changes for v2.yaml:


Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@cp-at-mit cp-at-mit marked this pull request as ready for review March 11, 2026 17:35
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