Skip to content

Convert BuiltIn Video Block's html from mako template into django template #427

Closed

Description

@farhan

In this ticket we have to convert the BuiltIn Video Block's html from mako template to django template.

Reasons:

  • We are parting ways with the mako template
  • Eventually we have to extract out the Video Block into xblocks-contrib repository

Acceptance Critieria:

  1. html template should be refactored to django template with minimal code changes
  2. Video XBlock experience shouldn't be changed
  3. All unit and karma test cases should be passed on the edx-platform

Further details:
Major work of it has already been done in this PR
Rational is to convert it within edx-platform and ship the task individually to the production.
After that changes will removed from shared video xblock extraction PR.

Activity

  1. changed the title [-]Convert mako template into Django Template[/-] [+]Convert BuiltIn Video Block's html from mako template into django template[/+] on Oct 15, 2025
  2. moved this to 🔖 Ready in Aximprovements Teamon Oct 15, 2025
  3. moved this from 🔖 Ready to 🏗 In progress in Aximprovements Teamon Oct 20, 2025
  4. salman2013 commented on Oct 22, 2025

    @salman2013

    To render the dango template in video_block I tried two approaches.

    In the first approach, I tried using the resource loader’s method to render the Django template, similar to how it’s used in item_bank_block.
    However, this approach did not work because the resource loader couldn’t locate the HTML file in the lms/templates directory, as we’re rendering it from within the XModules.

    In the second approach, I used Django’s built-in render_to_string method to render the template. It successfully found and rendered the file on the LMS, but not on the CMS.
    With this approach i have created draft PR.

    The reason the file renders successfully in the LMS but not in the CMS is that video.html is available under lms/templates, and render_to_string can find it there. However, in the CMS, the file is not available.

    As per my understanding, we need to update the template path in the CMS settings so that it can locate and render the video.html file.

  5. moved this from 🏗 In progress to 👀 In review in Aximprovements Teamon Nov 3, 2025
  6. salman2013 commented on Nov 8, 2025

    @salman2013

    During manual testing i noticed there is a console error appearing although things are apparently working. I moved my PR back to draft from review and moving this ticket into progress again. Looking into detail why this is happening.

    Image
  7. moved this from 👀 In review to 🏗 In progress in Aximprovements Teamon Nov 8, 2025
  8. salman2013 commented on Nov 11, 2025

    @salman2013

    The above mention issue was occurring on MFE forntend-app-authoring .

    As per my understanding when i converted the tabs-aggregator.html template into django template and render it in studio_view method as django template it is not rendering properly and instead of responding with json it is responding with html, which is creating error in video.js on micro frontend.
    As there is already deprecation ticket to remove legacy video editor so i reverted my changes instudio_view to unblock my ticket.

  9. salman2013 commented on Nov 11, 2025

    @salman2013

    PR for this Ticket: openedx/openedx-platform#37509

  10. moved this from 🏗 In progress to 👀 In review in Aximprovements Teamon Nov 12, 2025
  11. moved this from 👀 In review to ✅ Done in Aximprovements Teamon Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions