Skip to content

Commit

Permalink
Merge pull request #6 from edly-io/farhan/EDLY-6851
Browse files Browse the repository at this point in the history
Resolve LTI1.1 basic outcome issue EDLY-6851
  • Loading branch information
mfarhan943 authored Jul 3, 2024
2 parents 7ecdbfb + 62b08de commit b31fe4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lti_consumer/lti_xblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lti_consumer/outcomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b31fe4d

Please sign in to comment.