Revert "Merge pull request #18340 from cpennington/fix-studio-xblock-rendering"
This reverts commit9a70ca78a5, reversing changes made toefd5b9abbd. Hopefully fixes EDUCATOR-3053
This commit is contained in:
@@ -137,7 +137,7 @@ class TestCachePrograms(CatalogIntegrationMixin, CacheIsolationTestCase, SiteMix
|
||||
|
||||
with self.assertRaises(SystemExit) as context:
|
||||
call_command('cache_programs')
|
||||
self.assertEqual(context.exception.code, 1)
|
||||
self.assertEqual(context.exception.code, 1)
|
||||
|
||||
cached_uuids = cache.get(SITE_PROGRAM_UUIDS_CACHE_KEY_TPL.format(domain=self.site_domain))
|
||||
self.assertEqual(cached_uuids, [])
|
||||
@@ -166,7 +166,7 @@ class TestCachePrograms(CatalogIntegrationMixin, CacheIsolationTestCase, SiteMix
|
||||
with self.assertRaises(SystemExit) as context:
|
||||
call_command('cache_programs')
|
||||
|
||||
self.assertEqual(context.exception.code, 1)
|
||||
self.assertEqual(context.exception.code, 1)
|
||||
|
||||
cached_uuids = cache.get(SITE_PROGRAM_UUIDS_CACHE_KEY_TPL.format(domain=self.site_domain))
|
||||
self.assertEqual(
|
||||
|
||||
@@ -29,8 +29,6 @@ from xmodule.seq_module import SequenceModule
|
||||
from xmodule.vertical_block import VerticalBlock
|
||||
from xmodule.x_module import shim_xmodule_js, XModuleDescriptor, XModule, PREVIEW_VIEWS, STUDIO_VIEW
|
||||
|
||||
import webpack_loader.utils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -144,11 +142,6 @@ def wrap_xblock(
|
||||
else:
|
||||
template_context['js_init_parameters'] = ""
|
||||
|
||||
if isinstance(block, (XModule, XModuleDescriptor)):
|
||||
# Add the webpackified asset tags
|
||||
for tag in webpack_loader.utils.get_as_tags(class_name):
|
||||
frag.add_resource(tag, mimetype='text/html', placement='head')
|
||||
|
||||
return wrap_fragment(frag, render_to_string('xblock_wrapper.html', template_context))
|
||||
|
||||
|
||||
|
||||
@@ -56,6 +56,5 @@
|
||||
router.trigger('search', requestedQuery);
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
}).call(this, define || RequireJS.define);
|
||||
});
|
||||
}(define || RequireJS.define));
|
||||
|
||||
0
openedx/tests/util/webpack_loader/__init__.py
Normal file
0
openedx/tests/util/webpack_loader/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
This module mocks the external package django-webpack-loader within
|
||||
python unittest execution, so python tests have no dependency on
|
||||
frontend assets. See LEARNER-1938 for further details.
|
||||
"""
|
||||
from django import template
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def render_bundle(bundle_name):
|
||||
"""
|
||||
This is the only webpack_loader function we call directly.
|
||||
"""
|
||||
return ''
|
||||
Reference in New Issue
Block a user