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

Bulk user upload allow duplicate idnumbers

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 3.0.5
    • None
    • Administration
    • MOODLE_30_STABLE
    • Hide

      Test 1 - Trying to create 2 users with the same idnumber

      1. Go to Site administration / ► Users / ► Accounts / ► Upload users
      2. Upload a csv with the following content

        username,firstname,lastname,email,idnumber
        bugman,Bug,Man,bug@a.com,12345
        bugman2,Bug,Man,bug2@a.com,12345
        

      3. You should see an error for the second user: "This ID number is already in use"

      Test 2 - Trying to create a user with an idnumber already taken

      1. Go to Site administration / ► Users / ► Accounts / ► Upload users
      2. Upload a csv with the following content

        username,firstname,lastname,email,idnumber
        bugman3,Bug,Man,bug3@a.com,12345
        

      3. You should see an error for the user: "This ID number is already in use"

      Test 3 - Trying to update the idnumber of an existing users to a value already taken

      1. Go to Site administration / ► Users / ► Accounts / ► Upload users
      2. Upload a csv with the following content

        username,idnumber
        bugman,1234
        

      3. You should see an error for the user: "This ID number is already in use"
      Show
      Test 1 - Trying to create 2 users with the same idnumber Go to Site administration / ► Users / ► Accounts / ► Upload users Upload a csv with the following content username,firstname,lastname,email,idnumber bugman,Bug,Man,bug @a .com, 12345 bugman2,Bug,Man,bug2 @a .com, 12345 You should see an error for the second user: "This ID number is already in use" Test 2 - Trying to create a user with an idnumber already taken Go to Site administration / ► Users / ► Accounts / ► Upload users Upload a csv with the following content username,firstname,lastname,email,idnumber bugman3,Bug,Man,bug3 @a .com, 12345 You should see an error for the user: "This ID number is already in use" Test 3 - Trying to update the idnumber of an existing users to a value already taken Go to Site administration / ► Users / ► Accounts / ► Upload users Upload a csv with the following content username,idnumber bugman, 1234 You should see an error for the user: "This ID number is already in use"

    Description

      From what I'm seen here the Upload Users tool doesn't validate idnumber uniqueness.


      Steps to reproduce the error

      1. Go to Site administration / ► Users / ► Accounts / ► Upload users
      2. Attached csv and upload it with default options
      3. Go to Site administration / ► Users / ► Accounts / ► Browse list of users and search for idnumber 1234
      4. You should see one user with this idnumber
      5. Open the attached file, change the username and email so they are unique on your instance
      6. Upload the file again with default options
      7. Go to Site administration / ► Users / ► Accounts / ► Browse list of users and search for idnumber 1234
      8. You should see two users with the same idnumber

      Expected behaviour
      Scenario 1 - Creating a new users

      If the csv provided has the column idnumber, before creating the user we should check if the idnumber is unique in the LMS and skip the user otherwise.
      Scenario 2 - Updating user information

      If the csv provided has the column idnumber, before updating the user information we should check if the idnumber is unique in the LMS and skip the user otherwise.

      Attachments

        1. dup-id.PNG
          dup-id.PNG
          24 kB
        2. test-users.csv
          0.1 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andreyamin André Yamin
              Daniel Neis Araujo Daniel Neis Araujo
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: