Repository navigation
Conversation
|
Thanks for the pull request, @rpenido! 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. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where 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. |
68dd8ac to
4464df4
Compare
| if "include_theme" in block.fields and block.fields["include_theme"].is_set_on(block): | ||
| olx_node.attrib["include_theme"] = serialize_field(block.include_theme) |
There was a problem hiding this comment.
include_theme is from xblocks-core, but explicitly referenced here
We could try to use a more generic solution, but it may cause other fields to be serialized too
969e072 to
e39700c
Compare
e39700c to
8c518f4
Compare
8c518f4 to
5b6f1ad
Compare
| olx_node.attrib["editor"] = block.editor | ||
| if block.use_latex_compiler: | ||
| olx_node.attrib["use_latex_compiler"] = "true" | ||
| # The deprecated built-in html block does not declare this field. |
There was a problem hiding this comment.
@rpenido is it possible to make the html block declare the field? Or is this just an unnecessary comment? I see plenty of other special handling for the html block here, so I don't think this needs an extra comment?
There was a problem hiding this comment.
I don't think we need to declare it. The comment is about the "include_theme" in block.fields guard to avoid an exception when using the legacy HTML xblock from here (xmodule/html_block.py).
openedx-platform/xmodule/html_block.py
Lines 550 to 559 in 4b5aff6
We probably don't need this comment. Removed here: d5fbdf2
Description
XBlockSerializerwrites a hard-coded allowlist of fields to OLX. The Text (HTML) XBlock's new opt-ininclude_themesetting is not in that allowlist, so it survives in the block's in-memory state after a save but is silently dropped from the exported OLX. Reopening the unit loses the setting. This PR adds it to the serializer.The reader (
HtmlBlock.parse_xml_new_runtime) is generic and already picks the attribute up, so writing it here is all that is needed for a full round-trip.User roles impacted: Course Author (the setting now survives save/export). No learner-visible change.
Supporting information
Principal PR: openedx/xblocks-core#308 — adds the
include_themefield to the XBlock and the JavaScript that honours it. This PR is the openedx-platform half: without it the checkbox appears to work and then reverts on save.Testing instructions
Other information
Deadline
None.
Private ref: FAL-4394