It is possible to upload a CSV file to create multiple user accounts quickly and easily within Moodle.
All you need is a CSV file with the required column headings of ‘username’, ‘email’, ‘firstname’, ‘lastname’, ‘city’ and ‘country’. These headings are all mandatory.
You can add a column for ‘password’ if you want to define the password for each user account. If you prefer to automatically generate a password and have it emailed to the user leave this column out.
You can also add custom user profile fields where they take the format of:
profile_field_xxxxx (xxxxx will be the ‘shortname of your custom profile field and must be all lowercase)
Once you have your CSV file populated with all of the mandatory fields you then login to Moodle as a site administrator:
- Site administration menu
- Users > Accounts > Upload users
- Upload your CSV file from your computer
- Select the appropriate settings, for new user creation select 'add new, skip existing users'
- Customise any of the other settings on the page, click on show advanced to see additional fields
- Click on 'Upload users'
The next screen confirms the user accounts that have been created and if there are any issues with the data in the CSV, error messages will also appear.
All of the user accounts created will now be available on the 'browse list of users' page.
Download a sample CSV file to populate and use below.