Commit bbe5494d by Régis Behmo

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)
parent a9c67c56
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment