Commit 927da344 by Calen Pennington

Fix data_dirs for /static link replacement

parent f0f7e0dc
......@@ -99,7 +99,7 @@ class XModuleItemFactory(Factory):
new_item = store.clone_item(template, dest_location)
# TODO: This needs to be deleted when we have proper storage for static content
new_item.metadata['data_dir'] = parent.metadata['data_dir']
new_item.data_dir = parent.data_dir
# replace the display name with an optional parameter passed in from the caller
if display_name is not None:
......
......@@ -303,7 +303,7 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
module.get_html = replace_static_urls(
_get_html,
getattr(module, 'data_dir', ''),
getattr(descriptor, 'data_dir', None),
course_namespace=module.location._replace(category=None, name=None))
# 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