Repository navigation
refactor: remove built-in Discussion XBlock implementation (slash-n-burn #37819) - #38749
irfanuddinahmad wants to merge 4 commits into
Conversation
|
Thanks for the pull request, @irfanuddinahmad! 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. |
291afe6 to
7649131
Compare
12185a2 to
ab31c37
Compare
ab31c37 to
89e5060
Compare
89e5060 to
7b1e644
Compare
…urn #37819) Removes xmodule/discussion_block.py, its JS assets, built-in unit tests, the USE_EXTRACTED_DISCUSSION_BLOCK toggle, and the conflicting 'discussion' entrypoint in pyproject.toml now that the extracted version in xblocks-contrib is the only implementation. Updates production imports in dump_course_structure and discussions/utils to import DiscussionXBlock from xblocks_contrib.discussion. Note: lms/djangoapps/discussion/ Django app is NOT in scope for this removal. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
xblocks-core 2.0.0 (#38473) removed the xblocks_contrib package. Point the platform entrypoint, imports and mock.patch targets at the new per-block packages (e.g. xblocks_contrib.video.video -> xblock_video.block). Co-Authored-By: Claude Opus 5.5 <[email protected]>
7b1e644 to
ff56d3a
Compare
Summary
Removes the built-in Discussion XBlock.
xblock_discussion.DiscussionXBlockhas been the default sinceUSE_EXTRACTED_DISCUSSION_BLOCK = True, so the built-in code no longer runs.Part of the Slash-n-Burn Built-In XBlocks epic. Closes openedx/public-engineering#538
Changes
Deleted:
xmodule/discussion_block.py(built-in class + shim),xmodule/js/src/discussion/display.js, the built-indiscussionentrypoint, and theUSE_EXTRACTED_DISCUSSION_BLOCKtoggle.Modified:
lms/djangoapps/courseware/management/commands/dump_course_structure.pyandopenedx/core/djangoapps/discussions/utils.pyimportDiscussionXBlockfromxblock_discussion.Tests:
xmodule/tests/test_discussion.py(4 tests)src/xblock_discussion/tests/: same names; 2 near-identical, 2 differ only in.format()vs f-stringKept in the platform:
lms/djangoapps/courseware/tests/test_discussion_xblock.py, which importsDiscussionXBlockfromxblock_discussion.Epic Step 1: Post-extraction commit review
Toggle flipped 2026-04-15 (
c534f5754f). The 1 later commit is cosmetic (lint-amnesty). A legacy-attribute fix (d71f81312d) landed the day before the toggle; xblocks-core already has an equivalent fix (0dd64cd, 2026-04-02). Nothing to port.Test plan
Tested on a local Tutor nightly (master
6f85d63c7f+ xblocks-core 2.0.0) through the REST APIs and a headless browser, because PR sandboxes aren't deploying (open-craft/pr-sandbox-automation#28). A box is ticked only if that flow actually ran.discussionisn't an allowed V2 library block typedump_course_structureruns on a course with 3 Discussion blocks (exit 0, all listed)pytest lms/djangoapps/courseware/tests/test_discussion_xblock.py(18 passed locally),npm run buildV2 Library checklist: N/A (Discussion isn't offered in libraries)
Content Libraries V2: smoke tests (historically the most fragile area for extracted blocks: openedx/xblocks-core#123, openedx/xblocks-core#132, openedx/xblocks-core#243, openedx/xblocks-core#274)
XBlock.add_xml_to_nodefirst in the MRO)Discussion-specific:
discussionisn't in/api/libraries/v2/<lib>/block_types/)dump_course_structurestill runs on a course containing a reused Discussion block — not ticked: a reused block isn't possible (D1);dump_course_structurepasses on a course with 3 Discussion blocksLibrary checklist compiled from the Aximprovements manual test doc (Extracted Block Tests tab) and the Ulmo test sheet's library cases. Generated using Claude Code.
Screenshots
5 screenshots (LMS, Studio unit, V2 Library)
Local Tutor nightly, 2026-11-12
Captured automatically during the local smoke tests (the sandbox isn't reachable yet, see open-craft/pr-sandbox-automation#28). All images: irfanuddinahmad/edx-platform@snb-smoke-screenshots/38749.
🤖 Generated with Claude Code
Settings