From 07487a8d8f5124d5cfaa16b58b488769f7c42ac2 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 29 Jan 2013 14:27:27 -0500 Subject: [PATCH] Use descriptor when setting up replace_urls, as it's been created at that point --- lms/djangoapps/courseware/module_render.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 064fdf1210..22d95ef8a2 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -248,8 +248,8 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, # by the replace_static_urls code below replace_urls=partial( replace_urls, - staticfiles_prefix='/static/' + module.metadata.get('data_dir', ''), - course_namespace=module.location._replace(category=None, name=None), + staticfiles_prefix='/static/' + descriptor.metadata.get('data_dir', ''), + course_namespace=descriptor.location._replace(category=None, name=None), ), node_path=settings.NODE_PATH, anonymous_student_id=unique_id_for_user(user),