From bbe5494df123a2173200669768f4297578aea23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 30 Jun 2015 19:06:45 +0200 Subject: [PATCH] Fix XBlock class loading in local resource view Some XBlock classes were being (randomly) incorrectly loaded. This was due to an error in the way the XBlock.load_class method was called. Error was happening randomly because of the cache mechanism in the class loading method. (see PLUGIN_CACHE) --- cms/djangoapps/contentstore/views/xblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/views/xblock.py b/cms/djangoapps/contentstore/views/xblock.py index 56a4289d56..948a039855 100644 --- a/cms/djangoapps/contentstore/views/xblock.py +++ b/cms/djangoapps/contentstore/views/xblock.py @@ -20,7 +20,7 @@ def xblock_resource(request, block_type, uri): # pylint: disable=unused-argumen Return a package resource for the specified XBlock. """ try: - xblock_class = XBlock.load_class(block_type, settings.XBLOCK_SELECT_FUNCTION) + xblock_class = XBlock.load_class(block_type, select=settings.XBLOCK_SELECT_FUNCTION) content = xblock_class.open_local_resource(uri) except IOError: log.info('Failed to load xblock resource', exc_info=True)