Moodle Instance Set-up

A Moodle Instance record holds the connection details of one Moodle site, together with its synchronization settings and health information. Institutions running more than one Moodle site create one record per site.

Creating an Instance

Go to Moodle Integration ‣ Instances and click New.

../../_images/moodle_instance_list.png

Fill in the Connection section:

  1. Name :- A label for the site, for example Main Campus Moodle.

  2. Moodle URL :- The base URL of the Moodle site, for example https://moodle.example.com. Do not add a trailing slash and do not include /webservice/rest/server.php.

  3. API Token :- The token generated in Moodle. The value is masked on screen and is stored as a system parameter rather than on the instance table.

  4. Active :- Untick to stop every scheduled job for this site without deleting its configuration and mappings.

../../_images/moodle_instance_form.png

Click Save.

Testing the Connection

Click Test Connection in the form header. OpenEduCat calls the Moodle site information service and displays a notification containing:

  • the Moodle site name, version and the user the token belongs to,

  • the number of available web service functions against the number required,

  • a warning listing any missing functions that still have to be added to the openeducat_integration external service in Moodle.

../../_images/moodle_test_connection.png

A successful test also resets the failure counter and stamps the last successful sync time, which turns the instance’s health status green.

Tip

Always run Test Connection after saving a new token, and again after any change to the external service in Moodle.

Health Status

The status bar at the top-right of the form shows the current health of the connection. It is recalculated continuously and by the hourly health-check job.

Status

Meaning

Unknown

The instance has never completed a successful sync.

Healthy

Fewer than two consecutive failures and a successful sync within the stale threshold.

Degraded

Two to four consecutive failures, or no successful sync within the stale threshold (four hours by default).

Down

Five or more consecutive failures. Check the token, the network and the Moodle site.

When an instance becomes degraded or goes down, a Moodle: Health Alert notification is sent, listing the status, the number of consecutive failures and the last successful sync.

Header Buttons

Button

Action

Test Connection

Verifies the URL, the token and the available web service functions.

Push All

Runs a complete push of every enabled entity, in dependency order. Asks for confirmation first.

Pull Grades

Runs the grade pull immediately for this instance.

Pull Engagement Now

Runs the engagement analytics pull. Visible only when Pull Engagement Analytics is enabled.

Push Admin Staff Now

Pushes the users referenced by the Role Mappings tab. Visible only when Push Admin / Non-Teaching Staff is enabled.

Sync Wizard

Opens the manual sync wizard preloaded with this instance.

Import/Reconcile

Opens the initial import and reconciliation wizard.

Except for Test Connection, these buttons are reserved for the Moodle Manager group.

Smart Buttons

The button box counts everything currently mapped between the two systems. Each button opens the matching filtered list.

Smart Button

Shows

Students, Faculty

Users mapped to a Moodle account.

Courses

Subjects mapped to a Moodle course.

Departments, Batches, Enrollments, Sessions

The remaining mapped entity types.

Mappings

Every mapping record belonging to this instance.

Sync Logs

The full operation history of this instance.

Errors

The sync log filtered on failed operations.

Retry Queue

Operations waiting to be retried.

Grade Items

Moodle gradebook items collected during grade pulls.

Instance Dashboard

The default kanban view of Moodle Integration ‣ Instances presents each site as a card with a coloured health stripe, the last push and pull timestamps, and an Auto badge when scheduled synchronization is enabled.

When errors occurred in the last 24 hours, a red band shows the count and opens the filtered error log when clicked. Each card also carries Sync to Moodle, Pull Grades and Logs buttons for quick operations.

../../_images/moodle_instance_kanban.png

Multi-Company

In a multi-company database, the Company tab links the instance to one company. Users only see the instances of the companies they are allowed to access, and instances without a company are visible to everyone.