Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-55905

Enrol_lti creates separate users when the tool is included twice on the same consumer which is not what users expect



    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.1.3, 3.2, 3.3, 3.5.5, 3.6.7, 3.7.3, 3.8.6
    • None
    • LTI provider



      I have a course setup on my moodle site which is sharing content using the publish as LTI tool. Next i have a blackboard site setup which i am using as a consumer of the lti links. On this site i have a student user which im using to access the lti content, however even though I am using the same student (with same first, last name and email address) to access the different lti links, my moodle site is creating a separate user for each lti link that i click on so i end up with many duplicates of the same user.

      I have checked that "Allow accounts with same email" is set to no under authentication settings and also tried to create user accounts with the same email manually and by uploading a csv. Both fail as they should, so why does creating accounts using lti still work?

      Is anyone else experiencing the same issue? or is this just a setting that i have missed somewhere?

      I am using Moodle 3.1.1+ (Build: 20160817).




      If we have one course where a user is a teacher and another where the same user is a student, then what role will their account have? They are in a different context so must be treated differently. But if they are in the same context, we can use the same user. Will come in handy once content-item is implemented on the provider side and in some cases people will want to select many different activities from one course and embed them separately

      Replication Steps (Moodle to Moodle, LTI 2.0):

      1. Set up provider site
      2. Set up a consumer site
      3. Enable auth_lti and enrol_lti in the provider site.
      4. In the provider, create a course and create 2 assignments in the course
      5. Publish both as LTI tools via "Published as LTI tools" course cog menu item
      6. In the consumer site, go to site admin > plugins > activity modules > external tool > manage tools
      7. Using the 'Tool URL' text field, enter the Registration URL from the first assignment (seen via "Published as LTI tools" in the provider course).
      8. Click "Add legacy LTI" and confirm the creation of the tool.
      9. Repeat the process for the second assignment, using its registration URL.
      10. Edit both of the tools you just created and change their "tool configuration usage" so that they are visible in the course activity chooser.
      11. Now ,create a new course in the consumer site.
      12. Click to add an activity or resource
      13. Select the "Assignment 1" lti tool you just configured.
      14. Name it "assign 1" and save
      15. Click to add an activity or resource again
      16. Select the "Assignment 2" lti tool you just configured.
      17. Name it "assign 2" and save
      18. Now, enrol a student, s1
      19. Log out
      20. Log in as the student
      21. Launch both 'Assign 1" and "Assign 2" resource links in the consumer course
      22. Log out
      23. Log into the platform site as an admin and view the course participants
      24. Notice you see two users with the same name, corresponding to the two launches made by user s1.


        Issue Links



              Unassigned Unassigned
              johno John Okely
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              18 Vote for this issue
              26 Start watching this issue