The connection between an external system (like a Student Information System (SIS), a Human Resource Information System (HRIS), or a Customer Relationship Management system (CRM)) and Moodle is one of integration and data exchange. This integration enhances efficiency, accuracy, and the overall user experience by ensuring that data is consistent and up-to-date across both systems while minimizing manual administrative tasks.
External systems like the SIS, a HRIS or a CRM are comprehensive databases that store and manage user-related data, including personal information, enrollment records, grades/ performance records, attendance, job history and more. These systems serve as the central repository for information pertinent to the student or employee.
For clients using a SIS/ HRIS/ CRM and Moodle, there is often a desire for the systems to sync and work together in a seamless and effortless manner and for this integration they choose NexSIS.
Moodle US has developed NexSIS in order to make it easy to sync student/teacher, employee/ manager, course, and enrollment data from an external system to your Moodle site. The external system is commonly a Student Information System (SIS), but it could be any system that can export data in Comma-Separated Value (CSV) format, as NexSIS only accepts CSV files.
Once your external system 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 steps:
Your external system exports up to five CSV files: one for users, one for courses, one for enrollments, metalinks, and/or course completions.
You upload the CSV files directly to the web server through secure file transfer protocol (SFTP method) or through the NexSIS Files page.
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.
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. If you need help with the API tab, please see the API specific documentation.
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. Italicized items represent an example of text that might be entered in the field. You may replace any of the italicized 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 or upload them through the NexSIS Files page, you'll need to make sure the files are in the proper format. Each of the five 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 described in the table below.
You can also force users to change their passwords upon first login by adding the following additional field.
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 Short name 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:
action,userid,username,firstname,lastname,email,auth add,STU3141,samsmith,Sam,Smith,firstname.lastname@example.org,ldap delete,STU3176,sallysitwell,Sally,Sitwell,email@example.com,ldap ...
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:
action,courseid,fullname,shortname,startdate,categorypath 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 default name for this file is “enrollments.csv”. Each row of the file defines a single user enrollment for a single course. The available columns for this file are:
A sample enrollments.csv file might look like this:
action,courseid,userid,roleid,timestart,timeend enroll,C554,STU3141,student,, unenroll,C802,STU3176,teacher,, enroll,C557,STU3275,student,2023-01-01T00:00:00,2023-09-01T00:00:00 …
Note: The course meta link plugin (enrol_meta) must be installed and enabled as a valid enrollment method. Course meta links make it possible for users enrolled in one course to be automatically enrolled in one or more other courses. The default name for this file is “metalinks.csv”. Every row defines a single course meta link. The available columns for metalinks.csv are:
A sample metalinks.csv file might look like this:
parent_courseid,metalink_courseid,action,group,groupname,groupid Math1,Math2,add,new,Math Students,M1 Math1,Math3,add,M1,, Science1,History1,add,none,, Science1,Science2,delete,,, …
Course Completion File
This file allows you to add a course completion timestamp for a user in a course if a course completion timestamp does not already exist for the user in the course. The default name for this file is “course_completions.csv”. This functionality is available starting in version 1.6.0 of NexSIS. The available columns for course_completions.csv are listed below.
A sample course_completions.csv file might look like this:
timestamp_course_completion,userid,courseid 2022-11-01T08:00:00.000Z,STU3141,C554 2022-11-05T09:30:00.000Z,STU1546,C551 ...
Once you have produced CSV files in the correct format, you'll need to transfer them to Moodle US's server. This can be done through secure file transfer protocol (SFTP method) or through using the NexSIS Files page to upload your files. To transfer the files via secure file transfer protocol (SFTP method) you will need credentials provided to you by Moodle US.
You will be given a directory where you can transfer your csv files. 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. You should keep the frequency of the scheduled task in mind - you do not want to have a situation where your task runs too frequently for the processing of the file which results in overwritten CSVs.
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.
NexSIS Files Page
This page is available starting in NexSIS 1.6.5. This page can be found by navigating to Site administration, then Plugins, and then NexSIS Files. This page can be used as a File transfer method for uploading files to Moodle US's server. It can be used in addition to or as an alternative to secure file transfer protocol (SFTP). This page also shows the status of existing files in your file directory.
After the files have been uploaded, NexSIS processes and archives the files during its next scheduled sync. 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: