Skip to content

fix: validate late enrollment course run metadata#436

Open
zwidekalanga wants to merge 2 commits into
openedx:mainfrom
zwidekalanga:cnx/late-enrollment-custom-presentations
Open

fix: validate late enrollment course run metadata#436
zwidekalanga wants to merge 2 commits into
openedx:mainfrom
zwidekalanga:cnx/late-enrollment-custom-presentations

Conversation

@zwidekalanga

@zwidekalanga zwidekalanga commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

Prevent late enrollment redemptions from progressing to LMS force enrollment when catalog metadata does not resolve to a concrete course run.

This keeps the existing allow_late_enrollment behavior, moves the metadata key behind a shared constant, and adds an explicit error telling operators to use the exact course run key for custom or one-off presentations.

Related PRs

Testing instructions

  • python -m pip install Django==4.2.21 openedx-ledger==1.5.23 getsmarter-api-clients==0.6.3
  • pytest enterprise_subsidy/apps/subsidy/tests/test_models.py::SubsidyModelRedemptionTestCase::test_redeem_late_enrollment_requires_resolved_course_run enterprise_subsidy/apps/api_client/tests/test_enterprise.py::EnterpriseApiClientTests::test_successful_create_single_learner_enrollment_forced
  • python -m py_compile enterprise_subsidy/apps/subsidy/constants.py enterprise_subsidy/apps/api_client/enterprise.py enterprise_subsidy/apps/subsidy/models.py enterprise_subsidy/apps/subsidy/tests/test_models.py
  • git diff --check

Merge checklist

  • All reviewers approved
  • CI build is green
  • Documentation updated in the companion Enterprise Access PR
  • Commits are squashed

@zwidekalanga zwidekalanga force-pushed the cnx/late-enrollment-custom-presentations branch from ae398dc to c7af1ef Compare June 1, 2026 08:58
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