From 9d3f4985edc8cc1b836739c8165fe7609842d387 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 2 Mar 2020 17:14:19 -0500 Subject: [PATCH] Allow Block Structures Collect to work in Studio Block Structures were meant to be gathered using the LMS process, as it's meant to be an optimized store for the LMS to use. But there's an argument to be made for at least the Collect side of the Collect + Transform could be a Studio concern, because it explicitly needs to avoid user-awareness. In either event, collect() was broken on devstack before this commit because Studio's runtime does not permit handler_url invocation on "thirdparty" XBlocks. Since VideoBlock is not really third-party (and it's questionable whether there's any benefit to making the distinction these days), I'm just making this change to allow Studio to run collect() without error in the Studio process. This will fix devstack, which does not properly route these collect() calls to the LMS process (because celery runs in-proc by default). --- common/lib/xmodule/xmodule/video_module/video_module.py | 2 +- 1 file changed, 1 insertion(+), 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..331b71da57 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -1138,7 +1138,7 @@ class VideoBlock( available_translations = self.available_translations(self.get_transcripts_info()) transcripts = { - lang: self.runtime.handler_url(self, 'transcript', 'download', query="lang=" + lang, thirdparty=True) + lang: self.runtime.handler_url(self, 'transcript', 'download', query="lang=" + lang) for lang in available_translations }