fix: save video asides during XML course import - #36500
Conversation
|
Thanks for the pull request, @asadali145! 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. DetailsWhere 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. |
1 similar comment
|
Thanks for the pull request, @asadali145! 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. DetailsWhere 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. |
6e8e8fe to
cd5bb97
Compare
1d4cc75 to
18c7747
Compare
|
Does this affect any XBlock class that overrides |
|
Sorry, I realize this fix only affects VideoBlock. But does the bug that it's fixing for videos also happen with other XBlocks that implement their own parse_xml, like ORA? |
@ormsbee Yes, this bug exists in ORA. I looked at the code, and XBlock Asides are not handled in parse_xml. Then, I tested it with our plugin. Any XBlock that overrides the parse_xml but does not handle the asides should have this bug. |
|
Is there a way we can add support at the LMS runtime or xblock repo level so that third-party XBlocks can support asides by default, without having to understand anything about them? |
@ormsbee Sorry, my reply took longer than expected. I don't have enough in-depth context of XBlock and the LMS Runtime, so my analysis might be wrong. Here are my thoughts on this:
Also, we would like to get this PR reviewed & merged before Teak as the general fix requires more time. I am attaching the code flow for a Problem block that is followed when parsing the Asides for a Problem Block. |
Sure, that's fair, and I'll review this as a local fix. My primary concern is that asides will be much more useful and easier to maintain over the long term if XBlock authors have to really understand them and account for them in their own code. And asides are much less likely to get deprecated over the long term if they are both useful and easy to maintain. FYI to @kdmccormick Reviewing this now... |
18c7747 to
797438e
Compare
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
|
@kdmccormick: do we have to worry about Asides breaking when built-in XBlocks are extracted? |
|
@ormsbee Can you be more specific about what you think would break? If someone's aside directly references XBlock code in edx-platform, then yes, that will break. It will also break if it directly references the dotted path of the block's class ( But if someone's aside just depends on the XBlock framework APIs and block tag (e.g. |
|
@kdmccormick: I'm not worried about people importing directly from edx-platform, only that if they make an Aside that wraps |
|
I see. I'll keep this in mind, and follow up on the issue you linked. |
Description
During course import, the video asides are not loaded from the XML properly. This results in inconsistent states after the export and reimport of a course. This works fine for the Problem and Other blocks.
This PR saves the Asides for the videos during course XML import.
Supporting information
#36489
Testing instructions
Alternatively, you can use ol_openedx_chat
/admin/xblock_config/studioconfig/. Keep it enabled.pip install ol-openedx-chat{LMS_BASE_URL}/admin/waffle/flag/and add waffle flagol_openedx_chat.ol_openedx_chat_enabled. Keep it enabled.Other Course SettingsOther Course Settings, you will need to enable it by doingFEATURES["ENABLE_OTHER_COURSE_SETTINGS"] = Truein CMS settings.Enable AI Chat Assistantagainst problem and video blocks.Enable AI Chat Assistantfor a few problems and videos.Deadline
24-02-25
So that it is included in Teak.