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:
Agrendalath
2022-07-07 22:07:04 +02:00
parent c2ac3d83c3
commit dd97c74fde
11 changed files with 44 additions and 64 deletions

View File

@@ -249,7 +249,7 @@ def course_expiration_wrapper(user, block, view, frag, context): # pylint: disa
return frag
course_expiration_fragment = generate_course_expired_fragment_from_key(
user, block.course_id
user, block.scope_ids.usage_id.context_key
)
if not course_expiration_fragment:
return frag