From d53ab876e2caf987b7b74c56a3897e715bd000dd Mon Sep 17 00:00:00 2001 From: Adam Butterworth Date: Mon, 30 Mar 2020 11:03:48 -0400 Subject: [PATCH] Fix public view of video xmodule (#23518) TNL-7092 Properly include video javascripts for the video public view --- common/lib/xmodule/xmodule/video_module/video_module.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py index a8449caf70..870f2b2e4d 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -260,7 +260,11 @@ class VideoBlock( if getattr(self.runtime, 'suppports_state_for_anonymous_users', False): # The new runtime can support anonymous users as fully as regular users: return self.student_view(context) - return Fragment(self.get_html(view=PUBLIC_VIEW)) + + fragment = Fragment(self.get_html(view=PUBLIC_VIEW)) + add_webpack_to_fragment(fragment, 'VideoBlockPreview') + shim_xmodule_js(fragment, 'Video') + return fragment def get_html(self, view=STUDENT_VIEW):