Remove unused 'module' parameter from replace_{static,course}_urls
This commit is contained in:
@@ -247,7 +247,7 @@ def load_preview_module(request, preview_id, descriptor, instance_state, shared_
|
||||
module = descriptor.xmodule_constructor(system)(instance_state, shared_state)
|
||||
module.get_html = replace_static_urls(
|
||||
wrap_xmodule(module.get_html, module, "xmodule_display.html"),
|
||||
module.metadata['data_dir'], module
|
||||
module.metadata['data_dir']
|
||||
)
|
||||
save_preview_state(request, preview_id, descriptor.location.url(),
|
||||
module.get_instance_state(), module.get_shared_state())
|
||||
|
||||
@@ -35,7 +35,7 @@ def wrap_xmodule(get_html, module, template):
|
||||
return _get_html
|
||||
|
||||
|
||||
def replace_course_urls(get_html, course_id, module):
|
||||
def replace_course_urls(get_html, course_id):
|
||||
"""
|
||||
Updates the supplied module with a new get_html function that wraps
|
||||
the old get_html function and substitutes urls of the form /course/...
|
||||
@@ -46,7 +46,7 @@ def replace_course_urls(get_html, course_id, module):
|
||||
return replace_urls(get_html(), staticfiles_prefix='/courses/'+course_id, replace_prefix='/course/')
|
||||
return _get_html
|
||||
|
||||
def replace_static_urls(get_html, prefix, module):
|
||||
def replace_static_urls(get_html, prefix):
|
||||
"""
|
||||
Updates the supplied module with a new get_html function that wraps
|
||||
the old get_html function and substitutes urls of the form /static/...
|
||||
|
||||
@@ -254,12 +254,11 @@ def _get_module(user, request, location, student_module_cache, course_id, positi
|
||||
|
||||
module.get_html = replace_static_urls(
|
||||
wrap_xmodule(module.get_html, module, 'xmodule_display.html'),
|
||||
module.metadata['data_dir'], module
|
||||
)
|
||||
module.metadata['data_dir'])
|
||||
|
||||
# Allow URLs of the form '/course/' refer to the root of multicourse directory
|
||||
# hierarchy of this course
|
||||
module.get_html = replace_course_urls(module.get_html, course_id, module)
|
||||
module.get_html = replace_course_urls(module.get_html, course_id)
|
||||
|
||||
if settings.MITX_FEATURES.get('DISPLAY_HISTOGRAMS_TO_STAFF'):
|
||||
if has_access(user, module, 'staff'):
|
||||
|
||||
Reference in New Issue
Block a user