Bulk upload users
From Learnit docs
If you need to add a large number of users to your site, and you don't want them to create their own accounts, you can upload a text (.csv) file to create the accounts in bulk.
- Log in to Moodle with your administrator account
- From the left panel (the Navigation drawer) click Site administration
- Click the Users tab
- Click 'Upload users
- Download to your computer the example text file . Leave the top line (with the fields) blank, and complete it with the details of your users, using a text editor like Notepad or a spreadsheet program like MS Excel or Libre Office Calc.
- Make sure you save it as a text (.csv) file.
- Go back to Upload users and upload your file, making sure the CSV delimiter is the same as the one you used. Usually this is a comma.
- Preview the accounts and decide on the settings and default values you want. (If in doubt, leave them as they are)
- Click Upload users again