Event Set

This API allows you to record student successfully accomplishing one or more events (or tasks) in a training application.

Read an Event Set

GET https://api.motar.io/edu/v1/event-set

Reads an event set.

Query Parameters

NameTypeDescription

eventSetId

string

The ID of an event set or the ID of an event set lesson.

Headers

NameTypeDescription

Authorization

string

Authentication token generated by user tokens.

[{
  "name": "Talk to the harbinger",
  "description": "You must speak with the harbinger to learn your doom.",
  "eventId": "evt-919a11786f1dae4a"
}, {
  "name": "Cross the bridge",
  "description": "Can you muster the courage to enter the deep dark cave?",
  "eventId": "evt-e84e76424435d361"
}, {
  "name": "Find the treasure",
  "description": "Find the hidden treasure, if you can!",
  "eventId": "evt-d37eb061ccf110be"
}]

Reporting Event Set Progress

Event Set modules work differently than other modules. Event Set progress is not reported directly via this API. Instead, event set progress is reported via xAPI statements. This allows a high degree of customization on the part of the implementor.

To report event set progress, you will need to create an xAPI statement referring to an event in an event sets, along with a lesson result ID specifying the module attempt. You can also include an optional "correct" flag to tell the MOTAR API whether or not the event activity counts as "correct" for score tracking purposes.

The eventId property can either be found by using the "Read an Event Set" API method above, or in the MOTAR Training dashboard course creator GUI.

A lessonResultId refers to a specific attempt at a lesson, with a start time, end time, and score. When you start a lesson, the API returns the new lessonResultId which can be used in subsequent API calls for activity during that lesson attempt.

Instructor Viewing - Reported Event Set

Example 1

In this example, we are reporting that a student has completed the first event in an event set correctly.

POST https://api.motar.io /edu/v1/xapi/statement
{
    "actor": "3a02cbb9ae4c2e157927d3259159bfa80793ecfebebd74ef89d4db65def37778dc592a8e0bee5b7b39608f5609446cf5f8832576d6a2b992d4919a42acc7e194e81ede86ea2aa670a1436be0678f2fa1ce",
    "verb": "Student spoke with the harbinger and learned their doom.",
    "object": {
        "lessonResultId": "ac5f1ba630fe00c39a1c938a22e80a8ba402e1e98b67597a7d4b66a670c510075639ebca09d275cd700f615f956512718ad53c561bb1ec697c5896386c31a850aafc865c1352981453e1d0e45a5ccbba13",
        "eventId": "evt-919a11786f1dae4a",
        "correct": true
    }
}

Example 2

In this example, we are reporting that a student has made a mistake on the second event. We have also included some additional metadata (specific to our application) about the attempt.

POST https://api.motar.io /edu/v1/xapi/statement
{
    "actor": "3a02cbb9ae4c2e157927d3259159bfa80793ecfebebd74ef89d4db65def37778dc592a8e0bee5b7b39608f5609446cf5f8832576d6a2b992d4919a42acc7e194e81ede86ea2aa670a1436be0678f2fa1ce",
    "verb": "Student fell off the bridge into the dark water below.",
    "object": {
        "lessonResultId": "ac5f1ba630fe00c39a1c938a22e80a8ba402e1e98b67597a7d4b66a670c510075639ebca09d275cd700f615f956512718ad53c561bb1ec697c5896386c31a850aafc865c1352981453e1d0e45a5ccbba13",
        "eventId": "evt-e84e76424435d361",
        "correct": false,
        "error": true,
        "assist": false,
        "timeTaken": "7min",
        "trapTriggered": "trap-82047711"
    }
}

Example 3

Note that a student can reattempt an event as many times as necessary within one overall lesson attempt (defined by your implementation). An event will be marked as correct as long as the latest statement is marked as such. In this example, the student is attempting event #2 again, and succeeding this time (with help from an AI agent).

POST https://api.motar.io /edu/v1/xapi/statement
{
    "actor": "3a02cbb9ae4c2e157927d3259159bfa80793ecfebebd74ef89d4db65def37778dc592a8e0bee5b7b39608f5609446cf5f8832576d6a2b992d4919a42acc7e194e81ede86ea2aa670a1436be0678f2fa1ce",
    "verb": "Student was able to cross the bridge successfully.",
    "object": {
        "lessonResultId": "ac5f1ba630fe00c39a1c938a22e80a8ba402e1e98b67597a7d4b66a670c510075639ebca09d275cd700f615f956512718ad53c561bb1ec697c5896386c31a850aafc865c1352981453e1d0e45a5ccbba13",
        "eventId": "evt-e84e76424435d361",
        "correct": true,
        "assist": true,
        "timeTaken": "4min",
        "agentPrompt": "Avoid broken bridge slats so you don't fall in the river!"
    }
}

Note that event set scoring is cumulative across all lesson attempts. The newest (last reported) attempt will be used to determine the cumulative score for all events, and represents the student's "final" score for the module. Scoring is also only calculated for events that have a correct flag reported. If a student does not record a correct/incorrect statement for an event, it will not be factored into their score.

Last updated