refactor: deprecates replace url related properties from ModuleSystem
Deprecates the following attributes from ModuleSystem: * replace_urls * replace_course_urls * replace_jump_to_id_urls A new ReplaceURLService is created as replacement with a unified replace_urls method
This commit is contained in:
committed by
Julia Eskew
parent
a5e51d0662
commit
c48c655998
12
common/djangoapps/static_replace/wrapper.py
Normal file
12
common/djangoapps/static_replace/wrapper.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
Wrapper function to replace static/course/jump-to-id URLs in XBlock to absolute URLs
|
||||
"""
|
||||
|
||||
from openedx.core.lib.xblock_utils import wrap_fragment
|
||||
|
||||
|
||||
def replace_urls_wrapper(block, view, frag, context, replace_url_service, static_replace_only=False): # pylint: disable=unused-argument
|
||||
"""
|
||||
Replace any static/course/jump-to-id URLs in XBlock to absolute URLs
|
||||
"""
|
||||
return wrap_fragment(frag, replace_url_service.replace_urls(frag.content, static_replace_only))
|
||||
Reference in New Issue
Block a user