Skip to content

feat: let enrolled learners and course staff read a course run's competency criteria - #4

Open
jesperhodge wants to merge 6 commits into
masterfrom
733-lms-course-criteria
Open

jesperhodge wants to merge 6 commits into
masterfrom
733-lms-course-criteria

Conversation

@jesperhodge

@jesperhodge jesperhodge commented Nov 18, 2026 •

Copy link
Copy Markdown

This is one of 2 PRs that implement openedx/openedx-core#733 - there is also openedx/openedx-core#945.

Please read the HTML PR Description:

openedx-platform-4-pr-description-2.html

AI Review

Code Review: review-platform-pr4-cleaned.html

Fix Report: fix-report-platform-pr4.md

Local verification

The failing checks from the CI pipeline have to do with the openedx-core PR not yet merged. So I ran them locally, against openedx-core PR openedx/openedx-core#945 at b9492ce plus the perm_exists guard requested there:

Check Commit Result
pytest lms/djangoapps/courseware/tests/test_course_competency_criteria_access.py under lms.envs.test c0be67db28 22 passed
pytest lms/djangoapps/courseware/tests/test_rules.py under lms.envs.test 2181510aba 7 passed
lint-imports c0be67db28 Contracts: 4 kept, 0 broken.
ruff check on lms/djangoapps/courseware/rules.py, lms/urls.py and the new test file c0be67db28 (lms/urls.py at 2181510aba, unchanged since) All checks passed!
pylint on lms/djangoapps/courseware/rules.py and the new test file c0be67db28 No messages.
manage.py lms check and manage.py cms check 2181510aba Only the existing fields.W342 warning.
openedx-core pytest tests/openedx_learning (SQLite) PR 945 at b9492ce plus the guard 802 passed, 10 skipped
Manual-testing demo, uvx showboat verify c0be67db28 Passes.

The platform checks ran in the Tutor LMS image. Not run locally: the platform's full unit-test suite (the lms, cms and shared-with-* shards), pylint over the whole repository, the migrations check, make pii_check, xsslint and check_keywords.

On GitHub, every job that loads lms/urls.py fails with ModuleNotFoundError: No module named 'openedx_learning.learner_urls', because the pinned openedx-core==1.21.0 does not contain PR 945, and fail-fast then cancels the remaining unit-test shards. "Lint Python Imports" passes.

Mounts openedx-core's learner CBE URL module in the LMS and overrides
openedx_learning.view_course_competency_criteria so that only users with
an active enrollment in the course run, or staff access to it, may read
its competency criteria.

Part of openedx/openedx-core#733

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jesperhodge and others added 5 commits November 18, 2026 19:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The content test's course now starts in the past, so the released and
restricted subsections are loadable as controls. The permission's comment
and docstring state the registration rule and where identical results
come from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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