-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix: Prevent Duplicate Instructions Rendering in Annotatable XBlock #36445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
kdmccormick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, and thank you for the description and screenshots.
One minor comment, then I'm happy to merge this in.
50c4b40 to
d378985
Compare
d378985 to
de8a0a9
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. |
In the Annotatable XBlock, the <instructions> element was appearing twice in the student view: * Once in "annotatable-instructions" (where it should be). * Again in "annotatable-content" (where annotations and other content are rendered). The _render_content method processed and rendered the entire XML data, including <instructions>, without removing it. The _extract_instructions method, which is responsible for removing <instructions>, was not called in _render_content, leading to duplication. This fix will: * Prevents duplicate instructions in the student view. * Maintains the expected behavior of showing instructions only in "annotatable-instructions". * No impact on existing annotation functionality.
…dx#36445) In the Annotatable XBlock, the <instructions> element was appearing twice in the student view: * Once in "annotatable-instructions" (where it should be). * Again in "annotatable-content" (where annotations and other content are rendered). The _render_content method processed and rendered the entire XML data, including <instructions>, without removing it. The _extract_instructions method, which is responsible for removing <instructions>, was not called in _render_content, leading to duplication. This fix will: * Prevents duplicate instructions in the student view. * Maintains the expected behavior of showing instructions only in "annotatable-instructions". * No impact on existing annotation functionality.
In the Annotatable XBlock, the <instructions> element was appearing twice in the student view: * Once in "annotatable-instructions" (where it should be). * Again in "annotatable-content" (where annotations and other content are rendered). The _render_content method processed and rendered the entire XML data, including <instructions>, without removing it. The _extract_instructions method, which is responsible for removing <instructions>, was not called in _render_content, leading to duplication. This fix will: * Prevents duplicate instructions in the student view. * Maintains the expected behavior of showing instructions only in "annotatable-instructions". * No impact on existing annotation functionality.
Description
In the Annotatable XBlock, the
<instructions>element was appearing twice in the student view:"annotatable-instructions"(where it should be)."annotatable-content"(where annotations and other content are rendered).The
_render_contentmethod processed and rendered the entire XML data, including<instructions>, without removing it. The_extract_instructionsmethod, which is responsible for removing<instructions>, was not called in_render_content, leading to duplication.Before:

After:

This fix will:
"annotatable-instructions".