Revert "Merge pull request #18340 from cpennington/fix-studio-xblock-rendering"

This reverts commit 9a70ca78a5, reversing
changes made to efd5b9abbd.

Hopefully fixes EDUCATOR-3053
This commit is contained in:
Eric Fischer
2018-06-15 13:18:27 -04:00
parent 44945dc03c
commit e72549cdbe
162 changed files with 7019 additions and 7642 deletions

View File

@@ -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(

View File

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

View File

@@ -56,6 +56,5 @@
router.trigger('search', requestedQuery);
}
};
}
);
}).call(this, define || RequireJS.define);
});
}(define || RequireJS.define));

View 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 ''