Fix data_dirs for /static link replacement
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user