Fix public view of video xmodule (#23518)

TNL-7092 Properly include video javascripts for the video public view
This commit is contained in:
Adam Butterworth
2020-03-30 11:03:48 -04:00
committed by GitHub
parent 564ffcfb79
commit d53ab876e2

View File

@@ -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):