feat: decouple enterprise from course start-date validation - #339
Merged
pwnage101 merged 1 commit intoJun 23, 2026
Merged
Conversation
This was referenced Jun 9, 2026
pwnage101
force-pushed
the
pwnage101/ENT-11544-edx-CoursewareViewStarted
branch
8 times, most recently
from
June 17, 2026 19:41
20a04b3 to
3a8bceb
Compare
Base automatically changed from
pwnage101/ENT-11544-edx-CoursewareViewStarted
to
release-ulmo
June 17, 2026 20:11
pwnage101
force-pushed
the
pwnage101/ENT-11544-edx-CourseStartDateValidationFailed
branch
3 times, most recently
from
June 17, 2026 23:08
116d95f to
eb81f50
Compare
pwnage101
marked this pull request as ready for review
June 17, 2026 23:09
There was a problem hiding this comment.
Pull request overview
This PR decouples enterprise-specific behavior from the core course start-date access check by introducing an Open edX Filters hook (CourseStartDateValidationFailed) that lets plugins substitute a custom start-date error payload, instead of hard-coding enterprise-specific errors in edx-platform.
Changes:
- Replaced enterprise-specific start-date error branching with a
CourseStartDateValidationFailedfilter hook incheck_start_date. - Extended
StartDateErrorto support optional error-code and message overrides, and removed the dedicatedStartDateEnterpriseLearnerError. - Updated/trimmed tests to remove enterprise enrollment setup and to validate the new filter override behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lms/djangoapps/courseware/access_utils.py | Runs CourseStartDateValidationFailed on start-date denial and converts filter overrides into StartDateError overrides. |
| lms/djangoapps/courseware/access_response.py | Adds override fields to StartDateError and removes the enterprise-specific start-date error class. |
| lms/djangoapps/courseware/tests/test_views.py | Updates access-utils tests to mock the new filter override path instead of enterprise enrollment plumbing. |
| lms/djangoapps/courseware/tests/test_access.py | Removes enterprise-specific query-count test and renames the remaining query-count test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Instead of enterprise-specific logic throwing an enterprise-specific start date validation error, CourseStartDateValidationFailed filter can now be used by plugins to throw a custom start date error. ENT-11544
pwnage101
force-pushed
the
pwnage101/ENT-11544-edx-CourseStartDateValidationFailed
branch
from
June 22, 2026 23:58
eb81f50 to
b6e4b1e
Compare
kiram15
approved these changes
Jun 23, 2026
kiram15
left a comment
There was a problem hiding this comment.
This looks good! Should we consider pinning the openedx-filters version?
Member
Author
|
openedx-filters has already been pinned to the version I need in the previous PR: #338 |
pwnage101
deleted the
pwnage101/ENT-11544-edx-CourseStartDateValidationFailed
branch
June 23, 2026 19:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of enterprise-specific logic throwing an enterprise-specific start date validation error, CourseStartDateValidationFailed filter can now be used by plugins to throw a custom start date error.
ENT-11544
blocked by:
blocks:
Integration Testing
I ran
scripts/provision-integration-test-ENT-11544.shthen manually tested the following scenarios in devstack:enterprise_learner_test-enterprise@example.comthen try to load http://localhost:2010/course/course-v1:edX+FutureX+2027enterprise_learner_test-enterprise@example.comthen try to load http://localhost:2010/course/course-v1:edX+UnschedX+TBDtest-enterprise_learner_2@example.comthen try to load http://localhost:2010/course/course-v1:edX+FutureX+2027audit@example.comthen try to load http://localhost:2010/course/course-v1:edX+FutureX+2027audit@example.com