From 8dd99defac359cf7ec68f89dbed6aab65deb58a1 Mon Sep 17 00:00:00 2001 From: Muhammad Farhan Khan Date: Tue, 17 Feb 2026 21:28:46 +0500 Subject: [PATCH] chore: optimize/correct the VideoBlock code (#38012) - Change the `i18n` service declaration from `wants` to `needs`, since the runtime must provide it for the block to function correctly. - Update the `public_view` webpack JS reference from `VideoBlockMain` to `VideoBlockDisplay`, as all VideoBlock JS files are bundled into `VideoBlockDisplay` and `VideoBlockMain` is not referring to anything or no longer exists in the repository. --- xmodule/video_block/video_block.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmodule/video_block/video_block.py b/xmodule/video_block/video_block.py index 4cf58420b6..d5c4f509c3 100644 --- a/xmodule/video_block/video_block.py +++ b/xmodule/video_block/video_block.py @@ -105,8 +105,8 @@ EXPORT_IMPORT_COURSE_DIR = 'course' EXPORT_IMPORT_STATIC_DIR = 'static' -@XBlock.wants('settings', 'completion', 'i18n', 'request_cache', 'video_config') -@XBlock.needs('mako', 'user') +@XBlock.wants('settings', 'completion', 'request_cache', 'video_config') +@XBlock.needs('mako', 'user', 'i18n') class _BuiltInVideoBlock( VideoFields, VideoTranscriptsMixin, VideoStudioViewHandlers, VideoStudentViewHandlers, EmptyDataRawMixin, XmlMixin, EditingMixin, XModuleToXBlockMixin, @@ -265,7 +265,7 @@ class _BuiltInVideoBlock( fragment = Fragment(self.get_html(view=PUBLIC_VIEW, context=context)) add_css_to_fragment(fragment, 'VideoBlockDisplay.css') - add_webpack_js_to_fragment(fragment, 'VideoBlockMain') + add_webpack_js_to_fragment(fragment, 'VideoBlockDisplay') fragment.initialize_js('Video') return fragment