refactor: deprecate course_id from ModuleSystem
This attribute is already deprecated for XBlocks in favour of directly retrieving it like `block.scope_ids.usage_id.context_key`. This commit also removes some redundant logging code which was omitted in the Datadog removal in #19420.
This commit is contained in:
@@ -211,7 +211,6 @@ def _preview_module_system(request, descriptor, field_data):
|
||||
track_function=lambda event_type, event: None,
|
||||
get_module=partial(_load_preview_module, request),
|
||||
mixins=settings.XBLOCK_MIXINS,
|
||||
course_id=course_id,
|
||||
|
||||
# Set up functions to modify the fragment produced by student_view
|
||||
wrappers=wrappers,
|
||||
|
||||
@@ -296,7 +296,7 @@ class CmsModuleSystemShimTest(ModuleStoreTestCase):
|
||||
def test_replace_urls(self):
|
||||
html = '<a href="/static/id">'
|
||||
assert self.runtime.replace_urls(html) == \
|
||||
static_replace.replace_static_urls(html, course_id=self.runtime.course_id)
|
||||
static_replace.replace_static_urls(html, course_id=self.course.id)
|
||||
|
||||
def test_anonymous_user_id_preview(self):
|
||||
assert self.runtime.anonymous_student_id == 'student'
|
||||
|
||||
Reference in New Issue
Block a user