Table des matières

Data synchronisation by CSV file: Integration guide

Introduction

This guide is intended for system integrators whose mission is to build a complete data integration and synchronisation chain. It presents techniques that generally require system access to the server hosting Moodle.

External feeding of command files

The operator can use the local file manager of the synchronisation tool to drop files to process. They can also trigger a tool to process a file dropped at the last moment.

In some cases, external programs feed the data automatically by supplying the CSV files. As Moodle's file system is opaque, the synchronisation tool automatically reintegrates into its file system any file dropped into the directory:

 <moodledata>/sync
 

This retrieval is done before any action, scheduled or interactive, on any of the integration tools.

Exceptions: files starting with '.' (hidden files) or '_' (omitted files) are not concerned by this synchronisation.

To set up an automated remote feed:

  1. Prepare a service sftp account (sftp rather than ftp).
  2. Prepare your remote IS to drop the files to process into the directory mentioned above.
  3. In the tool configuration, store the corresponding file names in the preconfigurations
  4. Configure the automatic processing (scheduled tasks) for each of the files to process.

Arbitration at drop time

Moodle must not be able to retrieve a file that is being transferred by FTP. Likewise, an external IS agent must be informed if the local file is being retrieved by Moodle's internal file system.

Two “lock” files are managed by the reintegration process to help with this synchronisation:

An alarm is sent by email to the administrator if one of the two files exists and is too old:


Back to the component index - Back to catalogue