CSV file upload to delete users

CSV file upload to delete users

by Jessica Sundarlal -
Number of replies: 3

Hi there

I have uploaded a csv file to delete certain users. 

Can someone please advise if it is possible to delete existing users depending on the options selected for "upload type"?  

Not 100% sure what each option means in terms of deleting users

Add new only, skip existing users

Add all, append number to username if needed

Add new and update existing users

Update existing users

I suspect I may have accidentally deleted users not on the list, by choosing the incorrect 'upload type' option

Hope I am making sense.

Any advice would be appreciated.

Moodle 3.0.2



Average of ratings: -
In reply to Jessica Sundarlal

Re: CSV file upload to delete users

by Randy Thornton -
Picture of Documentation writers

Jessica,

Here's documentation I updated recently with some explanations for the settings: https://docs.moodle.org/32/en/Upload_users#Upload_type

To delete users using the upload file, you have to set the type to Update existing users, but also:

1) You must have the delete column set in the upload file itself (see: https://docs.moodle.org/32/en/Upload_users#Deleting_accounts)  for each user you process for deletion.

AND 2) you must set on that same page with the Type option that the pull down option "Allow deletes" is Yes.


Unless you do BOTH those things, it will not delete users. It does not appear from your screenshot that you have the deleted field in your file, so it would not delete any users.

I recommend and follow as my practice to have a completely separate upload file when I delete users and run it apart from any other user changes. That way, I probably won't make any horrendous mistakes ;)


- Randy


In reply to Randy Thornton

Re: CSV file upload to delete users

by Jessica Sundarlal -

Thanks so much Randy smile

Yeah I uploaded the wrong csv file on that screenshot, but I am familiar with how to set it up.

I have saved your documentation for future reference, explains it perfectly!

Thanks again!

In reply to Jessica Sundarlal

Re: CSV file upload to delete users

by Randy Thornton -
Picture of Documentation writers


Jessica,

Great, glad that was helpful. And thanks for explaining about the screenshot upload, too, that puzzled me a bit.

If you find any mistakes in that documentation page or have a better way to explain things, then by all means, please improve it smile

Randy