Skip to content

[Refactor] Slash-n-Burn Discussion BuiltIn XBlock #538

@irfanuddinahmad

Description

@irfanuddinahmad

See parent epic: openedx/openedx-platform#37819


Rollout Position

Step 6 of 8 — The XBlock file itself is small (310 LOC), but extra smoke testing is warranted: the extracted Discussion toggle was previously reverted before being re-enabled (feat: enable extracted discussion xblock followed by a prior revert). The lms/djangoapps/discussion/ Django app (34K LOC) is out of scope and is not being removed.


Block Details

Toggle USE_EXTRACTED_DISCUSSION_BLOCK in openedx/envs/common.py
Shim class _BuiltInDiscussionXBlock in xmodule/discussion_block.py
Entrypoint discussion = "xmodule.discussion_block:DiscussionXBlock" in pyproject.toml

Checklist

Pre-condition

  • Review PRs merged into the built-in Discussion XBlock code in edx-platform after the extraction work was done — port any bug fixes or improvements to xblocks-contrib if not already there.

Steps (single PR)

  • Remove the toggle — delete USE_EXTRACTED_DISCUSSION_BLOCK from openedx/envs/common.py and all usages.
  • Remove the shim — delete _BuiltInDiscussionXBlock class and the from xblocks_contrib.discussion import DiscussionXBlock as _ExtractedDiscussionXBlock import from xmodule/discussion_block.py.
  • Remove the entrypoint — delete discussion = "xmodule.discussion_block:DiscussionXBlock" from pyproject.toml.
  • Remove remaining assets:
    • xmodule/discussion_block.py (Python class)
    • xmodule/js/src/discussion/display.js (JavaScript)
    • Any remaining CSS/template files specific to the built-in block
  • Run smoke tests on the extracted Discussion block to verify nothing is broken. Pay extra attention given the prior toggle revert history.

Scope Notes

Out of scope for this issue:

  • lms/djangoapps/discussion/ — the full discussion forum Django app (89 files, 34K LOC). This is a separate service that remains in edx-platform regardless of this XBlock removal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions