Skip to content

Conversation

@irtazaakram
Copy link
Member

@irtazaakram irtazaakram commented Mar 18, 2025

Adds HTML xblock extracting from edx-platform repo

Description

raw editor is deprecated and is replaced by https://github.com/openedx/frontend-app-authoring

Test PR

Make a test PR on edx-platform like this to run test cases on under development PR.

File references:

  • xblocks_contrib/html/html.py has been extracted from
  • xblocks_contrib/html/utils.py has been extracted from
  • xblocks_contrib/html/static/css/html.css has been extracted from
  • xblocks_contrib/html/tests/test_html.py has been extracted from here and here

Acceptance Criteria:

  • Extracted XBlock user experience should behave normal if required global css variables donesn't exist
  • Extracted XBlock funcationality should work fine after turning its relevant Django Settings Flag
  • In existing built in xblock implementation of edx-platform, update the status or data of the XBlocks. Then change the Django Settings flag and verify after shifting to extracted one, XBlocks are maintaining their required states (including XBlock completion status).
  • Also test the vice versa of above step, change XBlock from Extracted one to Built in implementation to check fallback case testings.
  • i18n is supported in the XBlock
  • Create a course, add multiple XBlocks in the course. Keep different XBlocks in diversity of states (done/un-done etc). Export the course then validate the XBlock states after importing it again.
  • Make a test PR for the extracted PR like this and fix the test cases if required.
  • Write further unit test cases for good code coverage

Relevant Issue: openedx/edx-platform#36283

@kdmccormick kdmccormick self-requested a review May 21, 2025 13:22
Copy link
Contributor

@salman2013 salman2013 left a comment

Choose a reason for hiding this comment

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

We have tested this PR on the sandbox with test enabled PR, everything seems working as expected, just one iFrame image is not loading on chrome but just on sandbox, locally extracted code is working properly.

@irtazaakram irtazaakram merged commit e6b10d1 into main Aug 8, 2025
11 of 12 checks passed
@irtazaakram irtazaakram deleted the htmlblock branch August 8, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants