Repository navigation
Conversation
|
Thanks for the pull request, @alezconsultant! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
mgwozdz-unicon
left a comment
There was a problem hiding this comment.
Claude and I both approve.
Record a learner's competency criterion status on every subsection grade write, with no setting to switch it on. In a deployment with no competency criteria the core call is one SELECT that returns no rows and queues no roll-up task, so the gate saved almost nothing and added a configuration step an operator could miss. The setting was added by openedx#39179 and shipped in no named release. Operators tracking master who never set it now run the competency write on every grade, and a competency storage failure fails the grade write, as the design requires. Each scored subsection grade write now runs one extra SELECT, and the query-count assertions in the grades tests are raised to match. Related to openedx/openedx-core#924 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
e03623b to
295e18e
Compare
Description
Removes the Django setting
ENABLE_COMPETENCY_MASTERY_TRACKINGand the guard it controlled in_record_competency_status(lms/djangoapps/grades/subsection_grade.py). A learner's competency criterion status is now recorded on every subsection grade write, on both the single-grade path and the bulk path, with no setting to switch it on.The setting was added by #39179 as a short-lived gate while the feature was validated. In a deployment with no competency criteria, the call into
openedx-core(record_graded_object_statuses) runs one SELECT on the criteria table that returns no rows, writes nothing, and queues no roll-up task, so the gate saved one query per scored subsection grade write and added a configuration step an operator could miss. The transaction blocks, the roll-up enqueue on commit, and the grade-calculated event are unchanged; the setting never gated them.The two tests that asserted setting-off behavior are removed, and the
override_settingsdecorators that switched the setting on for the remaining competency tests are gone, so those tests now run against the unconditional path.User roles affected: Operator. Learners and course authors see no change.
Supporting information
Testing instructions
There is no manual QA path; the change removes a setting and a guard, and the behavior it exposes is already covered by the grades unit tests. Covered by:
lms/djangoapps/grades/tests/test_subsection_grade.py(SubsectionGradeCompetencyStatusTestandSubsectionGradeCompetencyIntegrationTest), which assert that the competency write runs on both grade paths without any setting, that a status write failure rolls the grade back, and that a roll-up is queued only after commit.lms/djangoapps/grades/tests/test_api.py::OverrideSubsectionGradeTests::test_override_without_existing_grade_records_competency_statuslms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py::GradebookBulkUpdateViewTest::test_override_for_unattempted_learner_records_competency_statusTo check the removal by hand,
grep -rn ENABLE_COMPETENCY_MASTERY_TRACKING lms cms openedx commonreturns nothing.Other information
masterand never set the flag now run the competency write on every subsection grade write. AnyENABLE_COMPETENCY_MASTERY_TRACKINGvalue left in a settings file is ignored. A competency storage failure fails the grade write, as the design in openedx-core's ADR 0004 (competency mastery concurrency) requires; there is no switch for this.lms/djangoapps/grades/tests/test_tasks.pyandtest_course_grade_factory.pyare raised accordingly.master), so no deprecation ticket is needed under OEP-21.record_graded_object_statusesfromopenedx-core1.21.0, which is the current pin.Related to openedx/openedx-core#924