How to upload users

Summary of steps

Below is a series of steps you can follow to add users to your Moodle site

  1. Go to google sheets (or another such tool) and create a new file.
  2. In the top row add the fields username, firstname, lastname, email.
    1. Optional fields can also be added. Refer to the ‘Optional fields’ section.
    2. Your completed sheet should look like this:
    3. When finished, save the file as a CSV.

  1. Go to the Settings Administration > Site administration > Users > Accounts > Upload users.
  2. Add your file to the dropzone by dropping it or clicking on it to open the file picker.
    1. In the file picker select ‘Choose file’ and select the file you want from your documents.
    2. Select the ‘Upload this file’ button to add your image.
  3. Select ‘Upload users’.
  4. Upload users preview - check settings and default user profile settings.
  5. Upload users preview - click "Upload users".
  6. Upload users results - shows list of users, exceptions made in upload and summary of number of users.
  7. Upload users results - click "Continue".

Optional fields

It is possible to include a wide range of fields which will change various settings for your uploaded user. Below is a list of some of the common fields:

  • cohort1 - use the cohort-ID as included on your site, this will add your uploaded user to that cohort. You can add multiple cohorts to the CSV sheet by adding another field with the title cohort2, cohort3 and so on
  • country - use the country TWO LETTER CODE, in upper case, eg AU,ES,GB,US. These are all UPPER CASE. Using "au" or "es" or "USA" as a country code will result in a database error.
  • lang - use the two letter (or extended four lettter) code as defined in the Moodle language packs, e.g. en, es, en_us, de, in Site administration > Language > Language packs.This field will determine the default language of your uploaded user.
  • auth - The auth field must be used if the site uses an alternative authentication method, such as LDAP, as otherwise the authentication method will default to manual and users using a different auth method won't be able to log in. Use the shortname codes defined in Plugins > Authentication for the various types, e.g. manual, nlogin, ldap, cas, mnet, db, none. If you do not include an auth column, then newly created users will be created with the manual account type.

timezone - Should be in the format as found in the Location settings in terms of Zone/Region, eg. Australia/Sydney, Asia/Kathmandu, Europe/Madrid, etc. The entry is case sensitive so Europe/London will work but europe/london will not.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us