Repository navigation
refactor: remove built-in LTI XBlock implementation (slash-n-burn #37819) - #38747
irfanuddinahmad wants to merge 8 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. |
7eb55b9 to
6a680a4
Compare
3885169 to
0da9a28
Compare
0da9a28 to
9ebb7e9
Compare
9ebb7e9 to
f690abf
Compare
f690abf to
db8b616
Compare
068c1a0 to
1119c01
Compare
|
Blocked by openedx/xblocks-core#359. First review pass is done. I created openedx/xblocks-core#359 for LTI changes that never reached
Please merge those fixes and release xblocks-core before this PR. Once the built-in block is removed, there is no fallback. |
|
Thanks @farhan. I checked every item in openedx/xblocks-core#359 against current xblocks-core Fix: openedx/xblocks-core#360 covers all of them, and I've requested your review.
How I verified it:
I've marked this PR as blocked on #360 shipping in an xblocks-core release that master pins. The gap on our side: Epic Step 1 only reviewed commits after the toggle flip, plus one fix just before it. Both #36461 and #37562 landed between the start of the extraction copy (2025-02-20) and the flip (2026-02-02). None of the five regressions came from a commit at all. I've corrected Step 1 in the description. I'm now running the same check on the other open PRs (Poll, Annotatable, HTML, Problem): every platform commit since each block's copy started, plus a full template/JS/CSS comparison with the built-in block. Generated using Claude Code |
) Removes xmodule/lti_block.py, xmodule/lti_2_util.py, all LTI JS/CSS/template assets, webpack entries, the USE_EXTRACTED_LTI_BLOCK toggle, and the conflicting `lti` entrypoint in pyproject.toml now that the extracted version in xblocks-contrib is the only implementation. Collapses toggle-conditional test classes into single test classes targeting the extracted-block behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The built-in LTI block modules no longer exist, so these allowlist entries cannot be imported and fail test_default_allowlist_entries_import. The xblocks_contrib.lti equivalents remain on the allowlist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same nits as reviewed on #38745: - Drop the extra blank line left in openedx/envs/common.py after the toggle removal. - Drop the blank line left between rules in webpack.common.config.js. - Collapse the toggle-era base class + __test__ subclass back into the original test class name(s). The plugin cache reset was only needed for the removed importlib.reload. Test bodies are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1119c01 to
45a7190
Compare
Summary
xblock_lti.LTIBlockhas been the default sinceUSE_EXTRACTED_LTI_BLOCK = True, so the built-in code no longer runs.Part of the Slash-n-Burn Built-In XBlocks epic. Closes openedx/public-engineering#537.
Changes
Removed
xmodule/lti_block.py(built-in class and shim) andxmodule/lti_2_util.py(nowxblock_lti.lti_2_util).xmodule/js/src/lti/lti.js,xmodule/js/fixtures/lti.htmlandLTIBlockDisplay.css.lms/templates/lti.htmlandlti_form.html.LTIBlockDisplayandLTIBlockEditorwebpack entries, and theimports-loaderrule forlti/lti.js.USE_EXTRACTED_LTI_BLOCKtoggle.Changed
ltientrypoint inpyproject.tomlpoints atxblock_lti:LTIBlock. The name stays because existing content uses it.lms/envs/common.pydrops the two built-in LTI handlers fromXBLOCK_NOAUTH_HANDLER_ALLOWLIST(they can no longer be imported, which would failtest_default_allowlist_entries_import). Thexblock_ltientries stay.Tests
xmodule/tests/test_lti_unit.py,test_lti20_unit.py(43)src/xblock_lti/tests/: same names, near-identical bodies (compared one by one)TestLTI,TestLTIBlockListinginlms/djangoapps/courseware/tests/test_lti_integration.pylms/djangoapps/courseware/tests/test_block_render.pyxblock_lti.test_lti_preview_handlerkeeps master's version from #39405, without the toggle branchLTI integration test changes
importlib.reload(lti_block)dropped.__test__ = Truesubclass are collapsed back intoTestLTIandTestLTIBlockListing, the names used before the toggle.TestLTIcovers OAuth signature generation for the launch.TestLTIBlockListingcovers the course LTI-endpoints listing.Release notes: covered by the single Willow dev/op entry for all 8 blocks (Willow - Operator Dev Notes).
Epic Step 1: Post-extraction commit review
bcddf9cd53).cc56e41d0c) is already in xblocks-core; the docs link move (Update edx.rtd.io links to docs.openedx.org #36461) andpytz→zoneinfo(chore: use zoneinfo instead of pytz #37562) were missed, and clarify LICENSE #360 ports them.a6c3c3236donly parametrized tests.xblock_ltifound the five extraction regressions in Projected grades in progress page. Tests and some refactoring for grading. #359, also fixed by clarify LICENSE #360.Test plan
Local Tutor nightly, because PR sandboxes aren't reachable (open-craft/pr-sandbox-automation#28). Last re-verified on 2026-12-02 on this head with the xblocks-core it pins (4.0.0); the library UI checklist last ran on 2026-11-11/12. A box is ticked only if that flow actually ran.
XBLOCK_NOAUTH_HANDLER_ALLOWLISTerrors in the logstest_lti_integration.py(5 passed) andtest_block_render.py(164 passed),npm run build; theltientrypoint resolves toxblock_lti:LTIBlockTesting notes and edge cases
6f85d63c7f+ xblocks-core 2.0.0, through the REST APIs and a headless browser.test_default_allowlist_entries_importpasses in CI.USE_EXTRACTED_*_BLOCK = False(built-in) and on this branch. Theltifiles and its unit are identical.pull_xblock_translations+compile_xblock_translationsgivexblock_ltiits own catalog (ar,es_419andfrfully translated), and the block's i18n service loads it at runtime.V2 Library checklist: 12/12 pass
Content libraries have historically been the most fragile area for extracted blocks (openedx/xblocks-core#123, #132, #243, #274).
XBLOCK_NOAUTH_HANDLER_ALLOWLISTerrors in the logsChecklist compiled from the Aximprovements manual test doc (Extracted Block Tests tab) and the Ulmo test sheet's library cases. Generated using Claude Code.
Re-verification screenshots (2026-12-02, this PR's head)
Screenshots (5: LMS, Studio unit, V2 Library; local Tutor, 2026-11-12)
Captured automatically during the local smoke tests. All images: irfanuddinahmad/edx-platform@snb-smoke-screenshots/38747.
Settings
🤖 Generated with Claude Code