Incorrect users being added with bulk upload

Incorrect users being added with bulk upload

by Vanessa Reed -
Number of replies: 5
Hello. We are using bulk upload with:

username, firstname, lastname, email, course1, role1

We automatically generate the username cells as "firstname.lastname" in excel and then save as csv

Previously, when a username had been already used (tom.smith with email tomsmith@gmail.com), we would recieve an error when we attempted to upload a different user (tom.smith with email ilovepuppies@vet.net) with same username but different email address.

Now when we bulk upload, we do NOT receive and error and instead of the ilovepuppies@vet.net user, Moodle adds the tomsmith@gmail.com to the course. This is creating so many issues for us. How can we get Moodle to display the error when we try to upload a user with a same username as a previous user but different email address?
Average of ratings: -
In reply to Vanessa Reed

Re: Incorrect users being added with bulk upload

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Was their a feature that e-mail need not to be unique? Or was it just a proposal? What is the Moodle version you run?
In reply to Visvanath Ratnaweera

Re: Incorrect users being added with bulk upload

by Vanessa Reed -
We are using 4.2.1+ version. We do require unique email addresses. 

We are now having to manually check each user unfortunately. I just don't understand why we never had an issue until the last couple months.
In reply to Vanessa Reed

Re: Incorrect users being added with bulk upload

by Gregor McNish -
If you're using the manual bulk upload of users, there's a number of options that are presented when you do this-- see https://docs.moodle.org/402/en/Upload_users#Updating_users_preview including preventing changing usernames that already exist, or making sure usernames are unique.
In reply to Gregor McNish

Re: Incorrect users being added with bulk upload

by Vanessa Reed -
I always choose "add new and update existing" as we need to add both new students to courses and update exisiting students. But I suppose we could just choose "add new and skip existing" - would this still add students to the course who are already in our account from previous courses?

Although we have always done the add new and update existing so I don't know why we are only having problems in the last couple months?
In reply to Vanessa Reed

Re: Incorrect users being added with bulk upload

by Gregor McNish -
Possibly there's been changes to upload which have broken your process?

Is it possible to do it in 2 separate parts?
"update existing users only" -- to get new course enrolments for existing users
and
"Add all, append number to usernames if needed"? -- according to the docs this will append a number at the end of any who's usernames already exist.

It sounds like "add new update existing" will add new accounts, but if there's an existing username it will change the email to the new email in the upload file, thinking it's referring to an existing user, rather than same user with new name?
So with add new update existing, with username collisions, the system has no way to distinguish between existing users and new users?
there is the "existing user details" "no changes" option - which would stop existing users' email addresses getting updated-- but then any new users with existing usernames would have their course enrolment added to the original user.

I'd suggest using email addresses as their usernames; then you can guarantee uniqueness.
Average of ratings: Useful (1)