Skip to content

Autoformat Problem XBlock Source Files for Consistency (3/3) - #37760

Merged
irtazaakram merged 1 commit into
masterfrom
autoformat-problemblock-html
Jan 6, 2026
Merged

irtazaakram merged 1 commit into
masterfrom
autoformat-problemblock-html

Conversation

@irtazaakram

@irtazaakram irtazaakram commented Dec 15, 2025 •

Copy link
Copy Markdown
Member

This PR applies consistent formatting across all Problem XBlock–related files to align with the formatting conventions used in the xblocks-contrib extraction. The goal is to minimize noise during the extraction review and ensure that only functional differences remain when moving the Problem XBlock out of edx-platform.

We are in the process of extracting the Problem XBlock into xblocks-contrib/problem, where all code and templates are already formatted consistently. To make the migration diff easier for reviewers—and to avoid unnecessary churn caused by formatting—we are pre-formatting the corresponding files inside edx-platform using the same tools and configuration.

Related PR: openedx/xblocks-core#63
#37476

HTML / Template Files

djlint --reformat \
xmodule/capa/templates/problem_ajax.html \
xmodule/capa/templates/problem_notifications.html \
xmodule/capa/templates/problem.html \
xmodule/capa/templates/chemicalequationinput.html \
xmodule/capa/templates/choicegroup.html \
xmodule/capa/templates/choicetext.html \
xmodule/capa/templates/clarification.html \
xmodule/capa/templates/codeinput.html \
xmodule/capa/templates/crystallography.html \
xmodule/capa/templates/designprotein2dinput.html \
xmodule/capa/templates/drag_and_drop_input.html \
xmodule/capa/templates/editageneinput.html \
xmodule/capa/templates/editamolecule.html \
xmodule/capa/templates/filesubmission.html \
xmodule/capa/templates/formulaequationinput.html \
xmodule/capa/templates/imageinput.html \
xmodule/capa/templates/jsinput.html \
xmodule/capa/templates/mathstring.html \
xmodule/capa/templates/matlabinput.html \
xmodule/capa/templates/optioninput.html \
xmodule/capa/templates/schematicinput.html \
xmodule/capa/templates/solutionspan.html \
xmodule/capa/templates/status_span.html \
xmodule/capa/templates/textline.html \
xmodule/capa/templates/vsepr_input.html \
xmodule/capa/templates/annotationinput.html \
xmodule/capa/tests/test_files/snuggletex_correct.html \
xmodule/capa/tests/test_files/snuggletex_wrong.html \
xmodule/js/fixtures/checkbox_problem.html \
xmodule/js/fixtures/codeinput_problem.html \
xmodule/js/fixtures/imageinput.html \
xmodule/js/fixtures/imageinput.underscore \
xmodule/js/fixtures/jsinput_problem.html \
xmodule/js/fixtures/matlabinput_problem.html \
xmodule/js/fixtures/problem_content_1240.html \
xmodule/js/fixtures/problem_content.html \
xmodule/js/fixtures/problem-with-markdown.html \
xmodule/js/fixtures/problem-without-markdown.html \
xmodule/js/fixtures/problem.html \
xmodule/js/fixtures/radiobutton_problem.html
  • No logic changes — formatting only
  • Consistent style across Problem XBlock files

Fixes

  • js file paths for xmodule/capa/templates/designprotein2dinput.html & xmodule/capa/templates/editageneinput.html

Testing:

Problem Type Correct / Incorrect Partial Credit Logic / Random UI (Reset / Show Ans) Advanced (XML / Ext)
Single Select (MCQ) ✅ – ✅ ✅ ✅
Multi-select (Checkbox) ✅ ✅ – ✅ ✅
Dropdown ✅ – ✅ ✅ ✅
Numerical Input ✅ ✅ – ✅ ✅
Text Input ✅ – ✅ ✅ ✅
Circuit Schematic (Locally Tested) ✅ – – ✅ ✅
Custom JS (JSInput) (Locally Tested) ✅ ✅ ✅ ✅ ✅
Custom Python-evaluated (Locally Tested) ✅ ✅ ✅ ✅ ✅
Image Mapped Input ✅ – – ✅ ✅
Math Expression Input ✅ – ✅ ✅ ✅
Problem w/ Adaptive Hint (Locally Tested) ✅ ✅ – ✅ ✅
Drag and Drop ✅ – – ✅ –
Multipart Problems ✅ ✅ ✅ ✅ ✅
External Grader (XQueue) (Locally Tested) ✅ - – ✅ ✅
Python Lib (zip) (Locally Tested) ✅ – - ✅ ✅
Chemical Equation (Locally Tested) ✅ – – ✅ ✅
Gene Explorer (Locally Tested) tool works no idea whats the solution here – – ✅ ✅
Protein Builder (Locally Tested) tool works no idea whats the solution here – – ✅ ✅
Annotation ✅ – – ✅ ✅
File Submission (Locally Tested) ✅ – – - ✅
Code Input – – – – –
MATLAB Problem - – – - -
VSEPR (Molecular Geometry) (Dead???) – – – – –
Crystallography (Dead???) – – – – –
Molecule Editor (editamolecule) (Dead???) – – – – –

Library Test:

  • Problem created in V2 Content Library, edited, published
  • Library problem used in a course
  • Library problem overridden in course

Relevant issue: #36538

@irtazaakram irtazaakram added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Dec 16, 2025
@irtazaakram
irtazaakram force-pushed the autoformat-problemblock-html branch 2 times, most recently from 81af1dd to 1acdd62 Compare December 16, 2025 08:48
@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@irtazaakram
irtazaakram force-pushed the autoformat-problemblock-html branch from a1d009a to 2c1c116 Compare January 5, 2026 04:09
@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@irtazaakram
irtazaakram marked this pull request as ready for review January 5, 2026 07:45
Comment thread xmodule/capa/templates/choicegroup.html Resolved
@irtazaakram
irtazaakram merged commit fd33d80 into master Jan 6, 2026
69 checks passed
@irtazaakram
irtazaakram deleted the autoformat-problemblock-html branch January 6, 2026 12:55
anfbermudezme pushed a commit to Pearson-Advance/edx-platform that referenced this pull request Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create-sandbox open-craft-grove should create a sandbox environment from this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Format Problem XBlock Files in edx-platform

3 participants