Moodle US has developed a plugin called NexSIS that makes it easy to sync student, course, and enrollment data from an external system to your Moodle site. The external system is commonly a Student Information System (SIS), but it can be any system that can export data in Comma-Separated Value (CSV) format, as NexSIS only accepts CSV files.
Once your SIS is integrated with your Moodle site via the NexSIS plugin, the process of syncing data from one system to the other generally goes through the following process:
Your SIS exports up to three CSV files: one for users, courses, and/or enrollments.
Upload CSV directly to the web server
Your Moodle site detects the CSV files, updates the site with their content, and archives the file(s).
Note: This process can be entirely automated and set to run at regularly scheduled times. Once you complete the initial configuration of the integration, you can let it run automatically and put it out of your mind.
Before you begin creating CSV files for NexSIS to use, you will need to configure the NexSIS plugin settings on your site.
To begin, go to Site Administration, then Plugins, then Enrollments, and then Manage enroll plugins
Find NexSIS in the table of plugins and click the crossed-out eye icon to enable the plugin
Once the plugin is enabled, click the Settings link
The NexSIS settings page is divided into four tabs: General, API, Files, and Ethos.
This guide will focus on the General and Files tabs.
The settings configured in the General tab affect the NexSIS plugin sitewide, which means that both API and flatfile integrations will check these settings when running.
The settings configured in the Files tab affect what NexSIS does every time the Enrollments file processing scheduled task is run. In the Options/Example column of this table, normal font represents the list of available options you can select from and italics font represents an example of text that might be entered in the field. You may replace any of the italics font examples with your own text in order to customize your site's NexSIS plugin.
CSV file specifications
Before you send your CSV files to Moodle US's server, you'll need to make sure the files are in the proper format. Each of the three types of file has a certain set of required fields that must be included as well as optional fields that may be included, as per the NexSIS plugin settings above. The order of the fields does not matter. Each file must contain exactly one header row that lists the column headings.
The default name for this file is "users.csv". Every row in the file defines a single user. The columns for the users.csv file are:
One additional field you can include allows you to force users to change their passwords upon first login:
To determine the appropriate names to use for the column headings in the CSV file, you can download a CSV file with the correct headings for all fields in a user's profile by going to Site Administration, then Users, and then Bulk user actions, selecting at least one user, and choosing Download from the list of user actions.
It is possible to include custom user profile fields in your CSV files and update the values of those fields as well as the values of the default profile fields. In order to include custom user profile fields in the CSV, you will need to know the shortname value of the field. This is a unique identifier for the field, and it was determined when the profile field was created. To find this value, go to Site Administration, then Users, then Accounts, and then User profile fields, find the field in the list, click the gear icon in that field's row to go to its edit page, and you will see the shortname as the very first field on the page.
Once you have identified the custom profile field's shortname, you can include the field in your CSV files by creating a column named profile_field_shortname where “shortname” is the shortname value for the field. For example, in order to include the Fanciness level custom profile field from the screenshot above, you would need to create a column in the CSV file titled profile_field_fancy.
A sample users.csv file might look like this:
The default name for this file is “courses.csv”. Every row defines a single course. The available columns for courses.csv are:
A sample courses.csv file might look like this:
add,C554,Introduction to Psychology,PSYC101-01,2020-08-20T21:00:00:00,/Psychology
delete,C802,Artificial Intelligence II,COMP304-01,2020-08-20T21:00:00:00,/CompSci/Machine Learning
This file must be titled “enrolments.csv”. Each row of the file defines a single user enrollment for a single course. The available columns for the enrolments.csv file are:
A sample enrolments.csv file might look like this:
Once you have produced CSV files in the correct format, you'll need to transfer them to Moodle US's server. You'll need to transfer the files via the secure file transfer protocol (SFTP method) using the credentials provided to you by Moodle US.
You will be given a directory to transfer your users.csv, courses.csv, and enrolments.csv files to. It is recommended that you create a scheduled task (using cron or a similar scheduling program) that sends the exported files from your SIS to Moodle US's SFTP server at regular intervals.
Once you have transferred the files to Moodle US's server, the NexSIS plugin completes the actions noted on the CSV files. In order to see notifications or error messages that arise while NexSIS imports the data to the Moodle site, you can go to Site Administration, then Reports, and then NexSIS logs. Please note that if you see an error that NexSIS has failed to import one of the files, NexSIS will simply retry importing the file next time it runs.
If you’d like to learn more about the NexSIS API, you can read about that here: