Repository navigation
Open
openedx/openedx-platform
#38751Description
See parent epic: openedx/openedx-platform#37819
Rollout Position
Step 8 of 8 — Largest and highest-risk block (~15K LOC). The Problem/CAPA block is deeply integrated with the grading system and instructor dashboard, and supports many problem types (multiple choice, code input, circuit schematic, MATLAB, image input). Leave this for last.
Block Details
| Toggle | USE_EXTRACTED_PROBLEM_BLOCK in openedx/envs/common.py |
| Shim class | _BuiltInProblemBlock in xmodule/capa_block.py |
| Entrypoint | problem = "xmodule.capa_block:ProblemBlock" in pyproject.toml |
Note on stale annotation: The toggle annotation in
openedx/envs/common.pystill saystoggle_default: Falsebut the code has been set toTrue(viarefactor: Enable Extracted Problem XBlock #38152). The PR for this block should update the annotation totoggle_default: Truebefore removing the toggle entirely.
Checklist
Pre-condition
- Review PRs merged into the built-in Problem XBlock code in edx-platform after the extraction work was done — port any bug fixes or improvements to xblocks-contrib if not already there.
- Confirm all problem types (multiple choice, code input, circuit schematic, MATLAB, image input) work correctly in xblocks-contrib.
- Confirm grading pipeline integration is unaffected.
Steps (single PR)
- Fix stale annotation — update
# .. toggle_default: False→# .. toggle_default: Trueatopenedx/envs/common.pybefore removing the toggle. - Remove the toggle — delete
USE_EXTRACTED_PROBLEM_BLOCKfromopenedx/envs/common.pyand all usages. - Remove the shim — delete
_BuiltInProblemBlockclass and thefrom xblocks_contrib.problem import ProblemBlock as _ExtractedProblemBlockimport fromxmodule/capa_block.py. - Re-point the entrypoint — change
problem = "xmodule.capa_block:ProblemBlock"inpyproject.tomltoproblem = "xblock_problem:ProblemBlock". The nameproblemstays in the platform, because xblocks-core only registers_problem_extracted(for testing). - Remove remaining assets:
-
xmodule/capa_block.py(Python class, 2,481 LOC) -
xmodule/js/src/capa/(display.js, imageinput.js, schematic.js — 7,759 LOC) -
xmodule/static/css-builtin-blocks/ProblemBlockDisplay.css(2,304 LOC) -
xmodule/templates/problem/(template files) - Webpack entries
ProblemBlockDisplay/ProblemBlockEditorinwebpack.builtinblocks.config.js
-
- Run smoke tests on the extracted Problem block covering all problem types and grading scenarios.
Metadata
Metadata
Assignees
Labels
No labels
Activity
irfanuddinahmad commentedon Jun 11, 2026
Implementation PR: openedx/openedx-platform#38751