Skip to content

Conversation

@ttqureshi
Copy link
Member

@ttqureshi ttqureshi commented Oct 23, 2025

The utility functions in xml_utils are derived from the XmlMixin class in the edx-platform. We are only retaining the functionality related to pointer tag parsing, ensuring that Extracted XBlocks can be exported and imported in the pointer tag format without any issue.

Here are the detailed references:

Utility Functions References
name_to_pathname https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L22
is_pointer_tag https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L30
serialize_field https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L54
deserialize_field https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L71
own_metadata https://github.com/openedx/edx-platform/blob/master/xmodule/modulestore/inheritance.py#L335
apply_pointer_attributes https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L499-L506
format_filepath https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L422
file_to_xml https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L178
load_file https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L188
load_definition_xml https://github.com/openedx/edx-platform/blob/master/xmodule/xml_block.py#L412
EdxJSONEncoder https://github.com/openedx/edx-platform/blob/master/openedx/core/lib/json_utils.py

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 23, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @ttqureshi!

This repository is currently maintained by @openedx/axim-engineering.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.


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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Oct 23, 2025
@ttqureshi ttqureshi self-assigned this Oct 23, 2025
@ttqureshi ttqureshi force-pushed the ttqureshi/pointer-tag branch 2 times, most recently from de1544d to 0a36a68 Compare October 23, 2025 12:38
@ttqureshi ttqureshi moved this to 🏗 In progress in Aximprovements Team Oct 23, 2025
@ttqureshi ttqureshi changed the title refactor: move pointer tag common utility functions to xml_utils.py refactor: move pointer tag common utility functions to xml_utils Oct 27, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Oct 27, 2025
@ttqureshi ttqureshi force-pushed the ttqureshi/pointer-tag branch 2 times, most recently from 1babd1b to 7e28de9 Compare October 28, 2025 14:37
@ttqureshi ttqureshi changed the title refactor: move pointer tag common utility functions to xml_utils move pointer tag common utility functions to xml_utils and pointer tag support in HTML XBlock Oct 29, 2025
@ttqureshi ttqureshi changed the title move pointer tag common utility functions to xml_utils and pointer tag support in HTML XBlock move pointer tag common utility functions to xml_utils and add pointer tag support in HTML XBlock Oct 29, 2025
@ttqureshi ttqureshi force-pushed the ttqureshi/pointer-tag branch from 7e28de9 to 05e3053 Compare October 29, 2025 10:49
@ttqureshi ttqureshi added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Oct 29, 2025
@ttqureshi ttqureshi force-pushed the ttqureshi/pointer-tag branch from 05e3053 to c57e3b0 Compare October 29, 2025 13:47
Copy link
Contributor

@farhan farhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, just minor doc improvements

@ttqureshi ttqureshi removed the create-sandbox open-craft-grove should create a sandbox environment from this PR label Oct 30, 2025
@ttqureshi ttqureshi force-pushed the ttqureshi/pointer-tag branch from 9951942 to 610d236 Compare October 30, 2025 10:52
Copy link
Contributor

@farhan farhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work ⭐

@farhan
Copy link
Contributor

farhan commented Oct 30, 2025

@ttqureshi Please mention, how did you do its manual testing

@ttqureshi
Copy link
Member Author

TESTING NOTES:
I created a course that contained various HTML blocks (Text, IFrame, etc.). Then, I exported the course to verify that the definitions were being exported in the expected pointer tag format. To confirm that the HTML pointer tags were generated correctly, I compared my course export with the export of the built-in HTML block—both manually and using this script.

After that, I imported the course (which included the pointer tag definitions of the HTML block), and all HTML blocks were initialized correctly, as expected.

@ttqureshi
Copy link
Member Author

@kdmccormick this PR is up for your reivew. Please take a look.

@ttqureshi ttqureshi requested a review from kdmccormick November 3, 2025 11:38
Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add type annotations for every argument and return value?

Otherwise, looks good!

@ttqureshi
Copy link
Member Author

PR is up for the final pass.

@mphilbrick211 mphilbrick211 moved this from Ready for Review to In Eng Review in Contributions Nov 6, 2025
@ttqureshi ttqureshi merged commit 290d22d into main Nov 7, 2025
12 of 13 checks passed
@ttqureshi ttqureshi deleted the ttqureshi/pointer-tag branch November 7, 2025 09:45
@github-project-automation github-project-automation bot moved this from In Eng Review to Done in Contributions Nov 7, 2025
@ttqureshi ttqureshi restored the ttqureshi/pointer-tag branch November 7, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Create xml_utils and add support for pointer tag utilities in the HTML XBlock.

5 participants