Commit 89f984c0 by Calen Pennington

Prefix courseware urls with /static, since they are no longer served through collectstatic

parent d132f2e1
...@@ -527,7 +527,7 @@ def load_preview_module(request, preview_id, descriptor, instance_state, shared_ ...@@ -527,7 +527,7 @@ def load_preview_module(request, preview_id, descriptor, instance_state, shared_
module.get_html = replace_static_urls( module.get_html = replace_static_urls(
module.get_html, module.get_html,
module.metadata.get('data_dir', module.location.course), '/static/' + module.metadata.get('data_dir', module.location.course),
course_namespace = Location([module.location.tag, module.location.org, module.location.course, None, None]) course_namespace = Location([module.location.tag, module.location.org, module.location.course, None, None])
) )
save_preview_state(request, preview_id, descriptor.location.url(), save_preview_state(request, preview_id, descriptor.location.url(),
......
...@@ -280,7 +280,7 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, ...@@ -280,7 +280,7 @@ def _get_module(user, request, descriptor, student_module_cache, course_id,
module.get_html = replace_static_urls( module.get_html = replace_static_urls(
_get_html, _get_html,
module.metadata['data_dir'] if 'data_dir' in module.metadata else '', '/static/' + module.metadata['data_dir'] if 'data_dir' in module.metadata else '',
course_namespace = module.location._replace(category=None, name=None)) course_namespace = module.location._replace(category=None, name=None))
# Allow URLs of the form '/course/' refer to the root of multicourse directory # Allow URLs of the form '/course/' refer to the root of multicourse directory
......
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