Overview

Moonami 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 looks something like this:

  1. Your SIS exports up to three CSV files: one for users, courses, and/or enrollments.
  2. You send the CSV files to a Moonami server that handles NexSIS integrations.
  3. Your Moodle site detects the CSV files, updates the site with their content, and archives the file(s).

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.

 

CSV file specifications

Before you send your CSV files to Moonami’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. The order of the fields does not matter. Each file must contain a header row that lists the column headings.

You can change the default settings for these files (including file name, delimiter, and available actions) from the NexSIS plugin settings on the Moodle site. You can get there by going to Site Administration > Plugins > Enrolments > NexSIS and choosing the Files tab.

You will find sample files attached to this document that you can use as templates.

User file

The default name for this file is “users.csv”. Every row in the file defines a single user. The required columns for the users.csv file are:

ColumnDescription
actionThe action to be performed on the user record, e.g. “add” or “delete”.
useridThe external system identifier for the user to create, update, or delete.
usernameThe Moodle username for the user.
firstnameThe user’s first name.
lastnameThe user’s last name.
emailThe user’s email address.

You may also include any other fields available on a user’s profile page in Moodle (including custom profile fields), but these other fields are optional. 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 > Users > Bulk user actions, selecting at least one user, and choosing “Download” from the list of user actions.

2020-02-28_13-03.png

A sample users.csv file might look something like this:

action,userid,username,firstname,lastname,email,auth
add,STU3141,samsmucker,Sam,Smucker,[email protected],ldap
delete,STU3176,sallysitwell,Sally,Sitwell,[email protected],ldap
...

 

Course file

The default name for this file is “courses.csv”. Every row defines a single course. The available columns for courses.csv are:

ColumnRequired?Description
actionYesAction to perform on the course record, e.g. “add” or “delete”.
courseidYesThe external system identifier for the course to create, update, or delete.
fullnameYesThe full name of the course.
shortnameYesThe shortened or abbreviated name for the course.
startdateNoThe start date and time of the course (in datetime format).
enddateNoThe end date and time of the course (in datetime format).
categorypathNoWhere this course belongs in the category hierarchy (in URI format).
formatNoMoodle course format to use for the course.
templateidNoThe identifier of a course template or shell to use when creating the course for the first time in Moodle.

A sample courses.csv file might look something 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
...

 

Enrollment file

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:

ColumnRequired?Description
actionYesAction to perform on the enrollment method, e.g. “enrol” or “unenrol”.
courseidYesThe external system identifier for the course to be enrolled in or unenrolled from.
useridYesThe external system identifier to the user to be enrolled or unenrolled.
roleidYesThe identifier of the role to be assigned the user, e.g. “student” or “teacher”.
timestartNoThe start date and time for the enrollment to take effect (in datetime format).
timeendNoThe end date and time for the enrollment to take effect (in datetime format).

A sample enrolments.csv file might look something like this:

action,courseid,userid,roleid
enrol,C554,STU3141,student
unenrol,C802,STU3176,teacher
...

 

File transfer

Once you have produced CSV files in the correct format, you’ll need to transfer them to Moonami’s server. You’ll need to transfer the files via the SFTP method, and in order to do this you will need credentials provided to you by Moonami.

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 Moonami’s SFTP server at regular intervals.

Once you have transferred the files to Moonami’s server, the NexSIS plugin takes care of the rest. 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 > Reports > 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.