Fix data directory passed to replace_static_urls

This commit is contained in:
Calen Pennington
2013-02-04 12:29:21 -05:00
parent ba7bd9022b
commit 401f564e6a
2 changed files with 2 additions and 2 deletions

View File

@@ -526,7 +526,7 @@ def load_preview_module(request, preview_id, descriptor, instance_state, shared_
module.get_html = replace_static_urls(
module.get_html,
'/static/' + module.metadata.get('data_dir', module.location.course),
module.metadata.get('data_dir', module.location.course),
course_namespace = Location([module.location.tag, module.location.org, module.location.course, None, None])
)
save_preview_state(request, preview_id, descriptor.location.url(),

View File

@@ -286,7 +286,7 @@ def _get_module(user, request, descriptor, student_module_cache, course_id,
module.get_html = replace_static_urls(
_get_html,
'/static/' + module.metadata.get('data_dir', ''),
module.metadata.get('data_dir', ''),
course_namespace = module.location._replace(category=None, name=None))
# Allow URLs of the form '/course/' refer to the root of multicourse directory