[Follow-up BE] Remove the ENABLE_COMPETENCY_MASTERY_TRACKING setting
Maintainer thường phản hồi trong vòng 1 ngày
@alezconsultant đang làm issue này rồi.
Từ ngày 3/11/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Start with lms/envs/common.py and _record_competency_status in lms/djangoapps/grades/subsection_grade.py, then review the listed tests in test_subsection_grade.py, test_api.py, and rest_api/v1/tests/test_gradebook_views.py. Remove the setting and its guard, clean up setting-off tests and override decorators, and run the grades test suite. Done when the acceptance criteria pass and the remaining grades tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
User Story
As a platform operator, I want a learner's competency criterion status recorded on every subsection grade write without a setting to switch on, in order to have mastery tracked as soon as criteria are attached to content, with no configuration step to miss.
Description
openedx/openedx-platform#39179 gated the competency status write on the subsection grade path behind the Django setting ENABLE_COMPETENCY_MASTERY_TRACKING, default False, but upon further inspection, this isn't necessary per the PR comment discussion. Essentially, with no competency criteria in a deployment, record_graded_object_statuses in openedx-core runs one indexed query that returns no rows and queues no roll-up task, so a deployment that does not use competencies pays one SELECT per subsection grade write and nothing else, so there is no reason to have an extra flag to prohibit this call for non-CBE instances.
Remove the setting and run the competency call unconditionally. The change is in openedx-platform.
Context
- #701's acceptance scenario "An operator can decline competency tracking entirely" no longer holds once this ticket is done.
Acceptance Criteria
-
ENABLE_COMPETENCY_MASTERY_TRACKINGand its toggle annotation block are gone fromlms/envs/common.py. -
_record_competency_statusinlms/djangoapps/grades/subsection_grade.pycallsrecord_graded_object_statuseswithout consulting any setting, and its docstring no longer describes a tracking-off case. - No test in
lms/djangoapps/gradesoverrides the setting, the tests that asserted setting-off behavior are removed, and the rest of the grades test suite passes.
Technical Details
This is a suggested approach, not the source of truth. The User Story, Description, and Acceptance Criteria define what must be true when the work is done.
Approach
- Delete the
ENABLE_COMPETENCY_MASTERY_TRACKINGassignment and the.. toggle_name:annotation block above it fromlms/envs/common.py. - In
lms/djangoapps/grades/subsection_grade.py, remove theif not settings.ENABLE_COMPETENCY_MASTERY_TRACKING: return []guard at the top of_record_competency_statusand update its docstring. Leave thetransaction.atomic()blocks, theon_commitenqueue, and the event emission as they are; the setting never gated them. - Remove
test_setting_off_saves_grades_without_calling_coreandtest_setting_off_does_not_enqueuefromlms/djangoapps/grades/tests/test_subsection_grade.py, and remove every@override_settings(ENABLE_COMPETENCY_MASTERY_TRACKING=True)decorator fromtest_subsection_grade.py,tests/test_api.py, andrest_api/v1/tests/test_gradebook_views.py. The tests under those decorators keep running, now against the unconditional path.
Files to create and modify
| File | Change |
|---|---|
| lms/envs/common.py | modified: remove the setting and its annotation block |
| lms/djangoapps/grades/subsection_grade.py | modified: drop the setting guard in _record_competency_status |
| lms/djangoapps/grades/tests/test_subsection_grade.py | modified: remove the two setting-off tests and the override decorators |
| lms/djangoapps/grades/tests/test_api.py | modified: remove the override decorator |
| lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py | modified: remove the override decorator |
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 35
- Merge trung bình
- 3 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openedx/openedx-core
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openedx/openedx-core#922 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
openedx/openedx-core#831 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openedx/openedx-core#827 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
openedx/openedx-core#930 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Followup Ticket - DraftingĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
openedx/openedx-core#928 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openedx/openedx-core
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
hkust-nlp/Toolathlon#101 ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SkyTruth/cerulean-cloud#219 ·
-
area:security priority:low size:small
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
RonaldHensbergen/composable-data-stack#1217 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
blixvip/BlendClone#27 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100