This article provides the information you need to successfully upload & create multiple user accounts to your Lambda Learn LMS using a .CSV (comma separated values) text file.
- UPLOAD USER PROCESS USING A CSV
UPLOAD USER PROCESS USING A CSV
There are multiple methods to bulk create and manage user accounts in your Lambda Learn LMS. The simplest method is to create a file commonly referred to as a .csv (comma separated values) text file and to upload it to your LMS. With this method you can accomplish several tasks, such as, enrol users in multiple courses with course specific roles, to updating user information in the User profile, even to "deleting" users from your site.
The following are the basic steps you take in the process of uploading users using a CSV text file:
STEP 1: Create the CSV Text File
‘Flat file’ is the name of a simple data file formatted so that each row contains one user account, and each column contains values for a particular field of the account. The flat file can be created using a simple text editor, such as Notepad++, or using a spreadsheet such as MS Excel or Google Sheets.
Required Profile Fields
Each new user account on a Lambda Learn site requires the following minimum information: username, firstname, lastname, email. The screenshot below shows you what a basic user upload csv text file looks like in a text editor.
It is important to keep in mind that each value is separated by a comma - with NO additional space before or after the commas.
When using a spreadsheet your file would look like this:
Optional Profile Fields
More commonly, organizations like to keep some further information as part of their users’ profiles. To provide values other than the default you can include one or more of these optional user fields:
In order for the LMS to know which exact fields in the user profiles will be populated with the data in our file, a header row indicating what field data is carried in each column needs to be inserted to the very top, as shown in yellow highlight in the image below:
The password field is optional if the 'New user password' setting on the upload screen is set to "Create password if needed and send via email".
The password field is required if the setting is "Field required in file".
If included, values should meet the requirements you have set for your site's Password policy.
To force password change for a particular user, set the password field to changeme. If omitted, a password will be generated for each user (during the next Cron job) and welcome e-mails sent out. The text for the welcome e-mail is in the language settings in Site administration > Language > Language customisation with a String identifier of 'newusernewpasswordtext'.
Custom Profile Fields
These are optional and depend on whether you have created any custom profile fields in your site. The name of the header in file is of the form 'profile_field_xxxxx' where xxxx is the unique shortname of custom user profile field name as you created it.
The field name should match the case of the profile field shortname. So, for instance if the shortname of your custom profile field is all upper case, for example, DOB, then use a header of profile_field_DOB to match the case, not profile_field_dob, which will produce a "is not a valid field name" error.
Likewise, a mixed case shortname such as Dob should have a header of profile_field_Dob. (The exception to this is if the shortname is all lower case, then any case will work in the field header, which is a historical quirk: but best practice is to match the case and you will avoid errors.)
For custom profile fields that are dates, use the ISO standard format YYYY-MM-DD, eg. 2014-06-19 which will then be properly localized in the interfaced. For example, a field called dohire for "date of hire", the fields could be:
You may optionally enrol users in already existing courses using manual enrolment. Only manual enrolment is done this way; if the manual enrolment method is disabled in a course, then no enrol is done.
You add fields in the upload file of this type:
For details on bulk user creation and course enrolment using a *.csv text file, see Create and Enrol Users with a CSV File.
Cohort Membership Assignment
You can assign users to any already existing Cohort by using only the "username" and the "Cohort ID" with just two fields in the file.
Note that this is an exception to the usual case where the firstname, lastname and email address of the user are required.
cohort# is the form to use and like enrolment in courses, you have to add a number to each header, so cohort1,cohort2, etc.
Internal cohort id numbers or non-numeric Cohort IDs of existing cohorts must be used; do not use the full name are not allowed. (Note that cohort id is what is usually known elsewhere as the "shortname".)
Here is a sample CSV file:
When your file is ready, proceed to the next step of file upload.
STEP 2: Upload the CSV
To start the upload process, navigate to Site administration > Users > Accounts > Upload users.
On the Upload users page that opens, click on the 'Choose a file...' button and navigate to the csv file you want to upload. There will be additional settings, but you may leave those as their default values.
Confirm that you have selected the correct file, and click the ‘Upload users’ button.
STEP 3. PREVIEW UPLOADED DATA & CONFIGURE SETTINGS
Once your file has been uploaded, you will be presented with a preview of the data that has been uploaded.
The preview window gives you a glimpse into the end result. This is the place to catch major formatting-related issues.
Upload Users Settings
These settings determine how the data in your file will be processed. Below is a brief overview of these settings:
This section of the screen offers you quick access into the default values for user profiles on your site. This gives you the option to modify the values so that the profiles of the newly uploaded/updated users will reflect these modifications.
One setting worth noting is the first row in this section which allows you to ‘Choose an authentication method’. If you set different authentication methods to be used with different groups of users on your site, you have the option to set these different preferences for groups of users ‘per flat file’.
Step 4: Confirm & Review Results
This is the moment when the user accounts are actually created or updated. Once the process is complete, you are presented with a ‘results’ screen. In addition to listing the new/updated users, the bottom of this screen will give you the total number of users created, as well as if there were any errors.
BEST PRACTICES & COMMON MISTAKES
Ensure that you have saved the file in .csv format.
Ensure that the field names are entered correctly on the top row of the .csv file.
If using a text editor to create your CSV file, remember to place consecutive commas with no space between when certain fields are empty for certain users, in order to correctly match the user information to the correct field names.
Country code convention: use two letter abbreviation (eg. United States = us, Canada = ca)
Field size limits must be within your site maximum.
Duplicate email entries used without selecting ‘update existing accounts’ as upload type will cause user account conflicts and cause the upload to fail.
We recommend using UTF-8 encoding on the file.