Skip to content

[Refactor] Slash-n-Burn Poll BuiltIn XBlock #533

Description

@irfanuddinahmad

See parent epic: openedx/openedx-platform#37819


Rollout Position

Step 1 of 8 — Smallest footprint (~380 LOC), no external integrations, minimal risk. Start here to validate the removal workflow end-to-end.


Block Details

Toggle USE_EXTRACTED_POLL_QUESTION_BLOCK in openedx/envs/common.py
Shim class _BuiltInPollBlock in xmodule/poll_block.py
Entrypoint poll_question = "xmodule.poll_block:PollBlock" in pyproject.toml

Checklist

Pre-condition

  • Review PRs merged into the built-in Poll 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_POLL_QUESTION_BLOCK from openedx/envs/common.py and all usages.
  • Remove the shim — delete _BuiltInPollBlock class and the from xblocks_contrib.poll import PollBlock as _ExtractedPollBlock import from xmodule/poll_block.py.
  • Remove the entrypoint — delete poll_question = "xmodule.poll_block:PollBlock" from pyproject.toml.
  • Remove remaining assets:
    • xmodule/poll_block.py (Python class)
    • xmodule/js/src/poll/ (JavaScript)
    • lms/templates/poll.html (template)
    • xmodule/static/css-builtin-blocks/PollBlockDisplay.css (CSS)
    • Webpack entries PollBlockDisplay / PollBlockEditor in webpack.builtinblocks.config.js
  • Run smoke tests on the extracted Poll block to verify nothing is broken.

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