Fix: Prevent Duplicate Instructions Rendering in Annotatable XBlock - #36445
Merged
Conversation
kdmccormick
requested changes
Apr 9, 2025
kdmccormick
left a comment
Member
There was a problem hiding this comment.
Looks great, and thank you for the description and screenshots.
One minor comment, then I'm happy to merge this in.
irtazaakram
force-pushed
the
fix-annotatable
branch
from
April 10, 2025 07:20
50c4b40 to
d378985
Compare
irtazaakram
force-pushed
the
fix-annotatable
branch
from
April 10, 2025 07:21
d378985 to
de8a0a9
Compare
kdmccormick
approved these changes
Apr 10, 2025
Contributor
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
Contributor
|
2U Release Notice: This PR has been deployed to the edX production environment. |
farhan
pushed a commit
that referenced
this pull request
Apr 17, 2025
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.
tonybusa
pushed a commit
to tonybusa/edx-platform
that referenced
this pull request
Apr 23, 2025
…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.
UsamaSadiq
pushed a commit
that referenced
this pull request
May 14, 2025
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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".