@@ -381,15 +381,15 @@ class LTIBlock(
381381 @property
382382 def category (self ):
383383 """Return the block type/category."""
384- return self .scope_ids .block_type
384+ return self .usage_key .block_type
385385
386386 @property
387387 def url_name (self ):
388- return self .location .block_id
388+ return self .usage_key .block_id
389389
390390 @property
391391 def location (self ):
392- return self .scope_ids . usage_id
392+ return self .usage_key
393393
394394 @location .setter
395395 def location (self , value ):
@@ -513,7 +513,7 @@ def get_context(self):
513513
514514 # These parameters do not participate in OAuth signing.
515515 'launch_url' : self .launch_url .strip (),
516- 'element_id' : self .scope_ids . usage_id .html_id (),
516+ 'element_id' : self .usage_key .html_id (),
517517 'element_class' : self .scope_ids .block_type ,
518518 'open_in_a_new_page' : self .open_in_a_new_page ,
519519 'display_name' : self .display_name ,
@@ -747,7 +747,7 @@ def get_resource_link_id(self):
747747 i4x-2-3-lti-31de800015cf4afb973356dbe81496df this part of resource_link_id:
748748 makes resource_link_id to be unique among courses inside same system.
749749 """
750- return str (parse .quote (f"{ settings .LMS_BASE } -{ self .scope_ids . usage_id .html_id ()} " ))
750+ return str (parse .quote (f"{ settings .LMS_BASE } -{ self .usage_key .html_id ()} " ))
751751
752752 def get_lis_result_sourcedid (self ):
753753 """
@@ -773,8 +773,8 @@ def get_course(self):
773773 In general, please do not add new code that access Modulestore, because it
774774 will not work with openedx_content. We do it here just to support a legacy feature.
775775 """
776- if isinstance (self .scope_ids . usage_id . course_key , CourseKey ):
777- return self .runtime .modulestore .get_course (self .scope_ids . usage_id . course_key )
776+ if isinstance (self .context_key , CourseKey ):
777+ return self .runtime .modulestore .get_course (self .context_key )
778778 return None
779779
780780 @property
@@ -785,7 +785,7 @@ def context_id(self):
785785 context_id is an opaque identifier that uniquely identifies the context (e.g., a course)
786786 that contains the link being launched.
787787 """
788- return str (self .scope_ids . usage_id . course_key )
788+ return str (self .context_key )
789789
790790 @property
791791 def role (self ):
@@ -882,8 +882,8 @@ def oauth_params(self, custom_parameters, client_key, client_secret):
882882 # Stubbing headers for now:
883883 log .info (
884884 "LTI block %s in course %s does not have oauth parameters correctly configured." ,
885- self .scope_ids . usage_id ,
886- self .scope_ids . usage_id . course_key ,
885+ self .usage_key ,
886+ self .context_key ,
887887 )
888888 headers = {
889889 'Content-Type' : 'application/x-www-form-urlencoded' ,
0 commit comments