Enroll users using a CSV file
As seen in the article on Traning management, in addition to enroll users directly on the platform, you can do it through a file in CSV format by correctly filling in the required fields. In this article you will see how to do it and which commands to use.
This operation is valid for the four types of content: Courses, Pathways, Events and Learning Programs.
Download the CSV file
First you must enter the training you want to modify. Go to the Admin Portal, and in the menu on the left, within the Trainings section, click on the type of content you are looking for. Look for the training in the list, you can use the different view tools.
Enter the training and click on the Enrollment button at the top right.
This page shows the users enrolled in the training directly or by group. Click on the Manage students button to access the Import CSV option.
Here are three options:
-
Import a CSV: drag the file here or click to select it from your computer. The tool reads the file and displays the previous results.
-
Empty template: download an empty CSV template with the required fields to be filled in.
-
CSV with current users: download a CSV file with the required fields and the list of users currently enrolled in the training.
You can use both options to download the CSV and start editing it.
Edit the CSV file
Once you have downladed the CSV file, open it with any text editor, although it is recommended to use a spreadsheet editor.
Required fields are:
-
#op# Operation refers to the type of training, remember there are three: recommended, optional and mandatory.
-
#isMandatory# Mandatory refers to whether the enrollment is mandatory or not.
-
#user# Username is the student's username in LMS.
-
#name# Name is the student's name in LMS.
-
#surname# Surname is the student's surname in LMS.
-
#email# E-mail is the student's email in LMS.
To enroll a new user you must add a row with the enrollment type and the user data separated by commas. The values for the type of enrollment are:
Type of enrollment
Operation
Mandatory
Recommended
summon
false
Optional
enroll
false
Mandatory
enroll
true
The data entered in the CSV (username, name...) must match the profile data in LMS, otherwise the tool returns an error message:
In the CSV file you can also modify the enrollment type of an existing user, simply editing the Operation and Mandatory fields. For example, if you want to change from mandatory to recommended enrollment, change the value enroll to summon and true to false.
If the CSV includes users already enrolled with the same type of enrollment, no change is made to their status. Just a warning message is displayed:
There is no limit to the number of entries or rows in the CSV file, but it cannot exceed 2MB size. Within this limit you can add as many users as you want, depending on the volume of data it is estimated to be between 25,000 and 28,000 entries.
Import CSV file
Once you have edited the CSV file with the users you want to import, click again on Manage students and Import CSV. Drag the file to the window or select it from the computer, the tool displays the preview results.
If no warning message is displayed, the process is successful. It is not necessary to edit any of the options, simply click on the Import button and the new users will be enrolled in the training.
You may see a warning message at the top if any input in the CSV is not correct, the message tells you the reason:
-
None of the users of your CSV meets the requirements to be added to this content if all the inputs in the CSV are incorrect. No users can be added or modified and therefore the Import button is disabled.
-
UNHANDLED_OPERATION if the value entered in any of the Operation fields is not correct.
-
USER_ALREADY_ENROLLED if the user entered already exists in the training with the same type of enrollment.
-
USER_NOT_FOUND if the tool does not find any user with the values entered. Check that the user data are the same as in the LMS profile.
It is not possible to use the CSV file to unenroll users.