diff --git a/lti_consumer/lti_xblock.py b/lti_consumer/lti_xblock.py index 8e64fa48..8d663403 100644 --- a/lti_consumer/lti_xblock.py +++ b/lti_consumer/lti_xblock.py @@ -823,9 +823,7 @@ def anonymous_user_id(self): This defaults to 'student' when testing in studio. It will return the proper anonymous ID in the LMS. """ - user_id = self.runtime.service(self, 'user').get_current_user().opt_attrs.get( - 'edx-platform.user_id', self.runtime.anonymous_student_id) - + user_id = self.runtime.anonymous_student_id if user_id is None: raise LtiError(self.ugettext("Could not get user id for current request")) return str(user_id) diff --git a/lti_consumer/outcomes.py b/lti_consumer/outcomes.py index 94112ec5..ef83ceac 100644 --- a/lti_consumer/outcomes.py +++ b/lti_consumer/outcomes.py @@ -184,7 +184,7 @@ def handle_request(self, request): return response_xml_template.format(**failure_values) user_id = unquote(sourced_id.split(':')[-1]) - real_user = self.xblock.get_lti_1p1_user_from_user_id(user_id) + real_user = self.xblock.runtime.get_real_user(user_id) if not real_user: # that means we can't save to database, as we do not have real user id. failure_values['imsx_messageIdentifier'] = escape(imsx_message_identifier)