Event types
The Moodle plugin local_ssea observes 15 standard Moodle events and translates them into SSEA's format before sending to the ingest endpoint. This page lists the full catalog.
Event catalog
Section titled “Event catalog”Session
Section titled “Session”| SSEA event_type | Moodle event | When it fires |
| --- | --- | --- |
| user_login | \core\event\user_loggedin | User signs in to Moodle. |
| user_logout | \core\event\user_loggedout | User signs out (explicit logout). |
Enrollment and course navigation
Section titled “Enrollment and course navigation”| SSEA event_type | Moodle event | When it fires |
| --- | --- | --- |
| user_enrolled | \core\event\user_enrolment_created | User enrolled in a course. |
| course_viewed | \core\event\course_viewed | User opens a course's main page. |
Resource views
Section titled “Resource views”| SSEA event_type | Moodle event | When it fires |
| --- | --- | --- |
| resource_viewed | \mod_resource\event\course_module_viewed | User views a resource (file, folder). |
| resource_viewed | \mod_url\event\course_module_viewed | User views a URL-type resource. |
| page_viewed | \mod_page\event\course_module_viewed | User views a Page-type resource. |
Quizzes
Section titled “Quizzes”| SSEA event_type | Moodle event | When it fires | Enriched metadata |
| --- | --- | --- | --- |
| quiz_attempted | \mod_quiz\event\attempt_started | User starts a quiz attempt. | attempt_number, time_limit_seconds, quiz_name |
| quiz_submitted | \mod_quiz\event\attempt_submitted | User submits a quiz attempt. | attempt_number, score_percent, raw_score, time_taken_seconds, state |
Assignments
Section titled “Assignments”| SSEA event_type | Moodle event | When it fires | Enriched metadata |
| --- | --- | --- | --- |
| assignment_submitted | \mod_assign\event\assessable_submitted | User submits an assignment. | submission_status, is_late, due_date, submission_draft |
Forums
Section titled “Forums”| SSEA event_type | Moodle event | When it fires | Enriched metadata |
| --- | --- | --- | --- |
| forum_post_created | \mod_forum\event\post_created | User creates a post (new or reply). | is_reply, parent_id, word_count, subject, forum_type, discussion_id |
Grades
Section titled “Grades”| SSEA event_type | Moodle event | When it fires | Enriched metadata |
| --- | --- | --- | --- |
| grade_updated | \core\event\user_graded | Teacher or system assigns/updates a user's grade. | finalgrade, item_type, grademax, grademin, gradepass, percent, passed |
| grade_item_updated | \core\event\grade_item_updated | A grade item definition is modified (e.g. weight, name). | item_name, item_type, item_module, grademax, gradepass, hidden, locked |
Completion
Section titled “Completion”| SSEA event_type | Moodle event | When it fires | Enriched metadata |
| --- | --- | --- | --- |
| module_completed | \core\event\course_module_completion_updated | Module completion status is updated. | completion_state, completion_type, course_module_id |
| course_completed | \core\event\course_completion_updated | Course completion status is updated for a user. | status, is_complete, time_completed, time_enrolled |
General payload structure
Section titled “General payload structure”All events share a common core:
{ "event_type": "quiz_submitted", "user_id": "<moodle_user_id>", "course_id": "<moodle_course_id>", "module_id": "<moodle_course_module_id>", "timestamp": "2026-04-13T14:30:00Z", "context": { "object_id": "<event_object_id>", "context_level": 70 }, "metadata": { "attempt_number": 2, "score_percent": 84.5, "time_taken_seconds": 1200, "state": "finished" }}Common fields:
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| event_type | string | Yes | One of the 15 types listed above. |
| user_id | string | Yes | Moodle user ID. |
| course_id | string | By event | Moodle course ID (optional for user_login / user_logout). |
| module_id | string | By event | Course module ID (activity events only). |
| timestamp | string (ISO 8601 UTC) | Yes | When the event happened at the source. |
| context | object | Optional | Moodle context (object_id, context_level). |
| metadata | object | Optional | Event-specific fields (see "Enriched metadata" columns above). |
What each event powers in the dashboard
Section titled “What each event powers in the dashboard”| SSEA event | Used for… |
| --- | --- |
| user_login, user_logout | Session metrics, inactivity detection (a key At-Risk factor). |
| user_enrolled | Enrollment growth per course and per period. |
| course_viewed, resource_viewed, page_viewed | Engagement metric, activity heatmap, estimated time in course. |
| quiz_attempted, quiz_submitted | Academic performance, at-risk correlation, academic scoring. |
| assignment_submitted | Submission rate, late-submission flag. |
| forum_post_created | Engagement depth (words per post, active conversations). |
| grade_updated, grade_item_updated | Grade distribution, low-grade alerts. |
| module_completed, course_completed | Completion rate per course/program, cohort analytics. |
Deduplication
Section titled “Deduplication”Each event generated by the plugin includes a unique event_id. The processing worker deduplicates repeat events based on a hash of key fields, so if your Moodle retries a send due to a network timeout the event is not counted twice.
Versioning
Section titled “Versioning”The event catalog is stable across minor plugin versions. If a new type is added in the future, it is added without breaking existing ones. Tenants do not need to make any changes when new types are added — they simply stop being ignored once the plugin is updated.