Skip to content

Moodle plugin

The local_ssea plugin is the bridge between your Moodle and SoftSys Edu Analytics. It observes 15 standard Moodle events, queues them, and resiliently sends them to the SSEA backend.

  • Moodle 4.1 or higher (4.5+ recommended).
  • PHP 7.4+ (aligned with Moodle 4.x requirements).
  • Administrator access in Moodle.
  • Tenant credentials provided by SoftSys Solutions:
    • Tenant ID (UUID)
    • API key (format ssea_ + 32 hex characters)
  • HTTPS egress allowed from your Moodle server to ingest.softsysanalytics.com and api.softsysanalytics.com.
  1. Download the latest local_ssea.zip from the release channel agreed with SoftSys Solutions (customers receive access to the package through the support channel).

  2. In Moodle, go to Site administration → Plugins → Install plugins.

  3. Upload the ZIP file.

  4. Follow the installation wizard.

  5. When finished, complete the initial configuration (next section).

After install, go to:

Site administration → Plugins → Local plugins → SSEA Analytics

Or directly: /admin/settings.php?section=local_ssea

SettingDescriptionExample
EnabledPlugin master switchYes
Server URLSSEA ingest endpointhttps://ingest.softsysanalytics.com
API keyTenant API keyssea_abc123...
Tenant IDUUID assigned by SoftSysf47ac10b-58cc-...
SettingDefaultDescription
Delivery modebatchsync (immediate), async (adhoc task), batch (DB queue)
Batch size50Events per batch (1–500)
Request timeout5 sHTTP timeout
SSL verifyYesOnly disable on local dev with invalid certificates
Debug loggingNoVerbose log to Moodle debug log
Do not send IP (no_ip)NoExclude IP from the payload before sending — useful for strict internal policies

The plugin supports three modes for sending events to ingest:

Events are written to the local_ssea_queue table and sent in batches every 5 minutes by the process_queue_task scheduled task. Best performance and resilience: if the ingest is temporarily down, events accumulate safely and are sent once it recovers.

Each event is queued as a Moodle adhoc task and delivered when Moodle’s task runner (cron.php) processes it. Better UX than sync mode (no per-page latency), but depends on the Moodle cron frequency.

Events are sent directly during the Moodle HTTP request. Simple but adds latency to every page that triggers an event. Recommended only for very low-traffic sites or for debugging.

The plugin observes 15 standard Moodle events: session, enrollment, course navigation, resource views, quiz attempts and submissions, assignment submissions, forum posts, grading, and completion.

See the full catalog in Event types.

The plugin declares four Moodle capabilities to control access to its views:

CapabilityDescriptionTypical roles
local/ssea:viewlearnerreportView the personal learner reportStudent, Teacher, Manager
local/ssea:viewinstructorreportView instructor reportsTeacher, Manager
local/ssea:managesettingsManage plugin configurationManager
local/ssea:viewreportsView aggregated admin reportsManager

The plugin registers two Moodle scheduled tasks:

TaskClassDefault frequency
SSEA: Process event queue\local_ssea\task\process_queue_taskEvery 5 minutes (*/5 * * * *)
SSEA: Migrate Moodle data\local_ssea\task\migrate_data_taskDaily (disabled by default — see below)

The data migration task syncs the current state of users, courses, enrollments, activities, and grades to the backend. Useful to pre-populate the dashboard with existing history when you install the plugin on a Moodle with content. It is disabled by default — enable it when you want to run the initial sync.

To enable it:

Site administration → Server → Scheduled tasks → SSEA Migrate Data → Edit → Enable

  1. Confirm the plugin is enabled: Site administration → Plugins → SSEA → “Enabled: Yes”.

  2. Test the connection: the plugin settings page has a “Test connection” button.

  3. Check the queue: run (from the Moodle UI or the DB):

    SELECT COUNT(*) FROM mdl_local_ssea_queue WHERE status = 'pending';
  4. Verify Moodle cron is running. Without cron, the process_queue_task never runs and events pile up. From the shell:

    Ventana de terminal
    php admin/cli/cron.php

    Or check your crontab / systemd unit.

  5. Check errors: Moodle debug log, and if the plugin has an errors table:

    SELECT * FROM mdl_local_ssea_errors ORDER BY created_at DESC LIMIT 20;
  • Verify the API key starts with ssea_ and has the correct length.
  • Verify the Tenant ID matches what SoftSys Solutions provisioned.
  • If you suspect the key was revoked, contact the support team to issue a new one.

Your tenant has exceeded its plan’s daily event quota. Options:

  • Wait for the UTC midnight reset.
  • Upgrade to a higher-quota plan. See Plans & limits.

If your Moodle server has an outdated CA bundle, TLS verification may fail against Cloudflare. Update the system CA bundle:

Ventana de terminal
sudo apt-get update && sudo apt-get install --only-upgrade ca-certificates

Only as a last resort in internal environments can you disable SSL verify in the plugin settings. Never in public production.

  1. Verify process_queue_task is running: Site administration → Scheduled tasks.
  2. Check errors: SELECT * FROM mdl_local_ssea_errors WHERE error_type = 'delivery_failed' LIMIT 10;
  3. If the ingest is temporarily down, events accumulate safely — they will flush once the ingest recovers.

Verify the plugin directory is named exactly ssea (not local_ssea):

<moodle_root>/local/ssea/ ← correct
<moodle_root>/local/local_ssea/ ← wrong
  1. Download the new ZIP or copy the new files into <moodle_root>/local/ssea/.
  2. Visit /admin/index.php — Moodle detects the new version and runs DB upgrades (they are incremental, no data loss).
  3. Existing settings are preserved.

Site administration → Plugins → Local plugins → SSEA → Uninstall

Uninstalling:

  • Removes the plugin’s local tables (queue, errors, metadata).
  • Does not remove the data already sent to SSEA (lives in the tenant’s backend).
  • Stops generating events immediately.

If you also want to delete the tenant’s data from the backend, contact the support team — see Data retention.

The plugin implements Moodle’s standard Privacy API provider (classes/privacy/provider.php):

  • When Moodle deletes a user, the plugin immediately stops generating events for that user_id.
  • Moodle’s standard export / right-to-be-forgotten flows include the plugin’s data.
  • The plugin API key is stored in Moodle’s config and is never logged in plaintext.
  • Events do not include the content of activities (quiz answers, forum bodies, uploaded files). Only metadata.

See Security & privacy for the full model.