Skip to content

Commit f3724d8

Browse files
Irfan Ahmadclaude
authored andcommitted
refactor: slash-and-burn Poll BuiltIn XBlock
Removes the built-in Poll XBlock implementation and all associated assets now that the extracted `xblocks_contrib.poll.PollBlock` is the default (USE_EXTRACTED_POLL_QUESTION_BLOCK has been True since extraction). - Remove USE_EXTRACTED_POLL_QUESTION_BLOCK toggle from common.py - Remove poll_question entrypoint from pyproject.toml - Delete xmodule/poll_block.py (built-in class + shim) - Delete xmodule/js/src/poll/ (JS assets) - Delete lms/templates/poll.html - Delete xmodule/static/css-builtin-blocks/PollBlockDisplay.css - Remove PollBlockDisplay/PollBlockEditor webpack entries - Delete xmodule/tests/test_poll.py (covered by xblocks-contrib) Closes openedx/public-engineering#533 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eac4c66 commit f3724d8

11 files changed

Lines changed: 1 addition & 977 deletions

File tree

lms/templates/poll.html

Lines changed: 0 additions & 8 deletions
This file was deleted.

openedx/envs/common.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,14 +2077,6 @@ def add_optional_apps(optional_apps, installed_apps):
20772077
# .. toggle_target_removal_date: 2026-04-10
20782078
USE_EXTRACTED_ANNOTATABLE_BLOCK = True
20792079

2080-
# .. toggle_name: USE_EXTRACTED_POLL_QUESTION_BLOCK
2081-
# .. toggle_default: True
2082-
# .. toggle_implementation: DjangoSetting
2083-
# .. toggle_description: Enables the use of the extracted poll question XBlock, which has been shifted to the 'openedx/xblocks-contrib' repo.
2084-
# .. toggle_use_cases: temporary
2085-
# .. toggle_creation_date: 2024-11-10
2086-
# .. toggle_target_removal_date: 2026-04-10
2087-
USE_EXTRACTED_POLL_QUESTION_BLOCK = True
20882080

20892081
# .. toggle_name: USE_EXTRACTED_LTI_BLOCK
20902082
# .. toggle_default: True

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ image = "xmodule.template_block:TranslateCustomTagBlock"
3434
library = "xmodule.library_root_xblock:LibraryRoot"
3535
library_content = "xmodule.library_content_block:LegacyLibraryContentBlock"
3636
lti = "xmodule.lti_block:LTIBlock"
37-
poll_question = "xmodule.poll_block:PollBlock"
3837
problem = "xmodule.capa_block:ProblemBlock"
3938
randomize = "xmodule.randomize_block:RandomizeBlock"
4039
sequential = "xmodule.seq_block:SequenceBlock"

webpack.builtinblocks.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ module.exports = {
5050
'./xmodule/js/src/xmodule.js',
5151
'./xmodule/js/src/raw/edit/metadata-only.js'
5252
],
53-
PollBlockDisplay: [
54-
'./xmodule/js/src/xmodule.js',
55-
'./xmodule/js/src/javascript_loader.js',
56-
'./xmodule/js/src/poll/poll.js',
57-
'./xmodule/js/src/poll/poll_main.js'
58-
],
59-
PollBlockEditor: './xmodule/js/src/xmodule.js',
6053
ProblemBlockDisplay: [
6154
'./xmodule/js/src/xmodule.js',
6255
'./xmodule/js/src/javascript_loader.js',

webpack.common.config.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -421,24 +421,7 @@ module.exports = Merge.merge({
421421
}
422422
]
423423
},
424-
{
425-
test: /xmodule\/js\/src\/poll\/poll.js/,
426-
use: [
427-
{
428-
loader: 'imports-loader',
429-
options: 'this=>window'
430-
}
431-
]
432-
},
433-
{
434-
test: /xmodule\/js\/src\/poll\/poll_main.js/,
435-
use: [
436-
{
437-
loader: 'imports-loader',
438-
options: 'this=>window'
439-
}
440-
]
441-
},
424+
442425
{
443426
test: /xmodule\/js\/src\/problem\/edit.js/,
444427
use: [

xmodule/js/src/poll/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

xmodule/js/src/poll/poll.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)