The Event Set module records student actions within an App lesson. Event Set modules are a type of performance assessment - the assessment analyzes how a student performs within an app without the need for an instructor to be present to manually grade the student.
The Event Set module is set up as a child module to an App lesson and xAPI statements within the App indicate activity for the Event Set. These can be correct, incorrect, or not scored (n/a in the UI). An overall attempt ends when you click complete or complete the lesson via API. The results table does not reflect overall attempts. It only shows "activity" in chronological order per event in the Event Set. However, the score of the latest overall attempt is what shows in the final row.
How to use the Event Module
Refer to this guide after authenticating
You cant interact with an event module before setting up your course. Refer to this guide for more info on Course Creator.
1. Lists All Courses
This request lists all courses the authenticated user is apart of, here you will grab the courseId for the next request.
To interact with the sandbox environment replace api.motar.io with sandbox.motar.io
Now that we have the courseId value, next you should run the Lists Lessons in a Course request. This request will give us the event module lessonId needed in Step 4.
Reporting to an event set requries the eventSetId, this request will give you the next value needed for reporting to an event set.
Read An Event Set
GEThttps://api.motar.io/edu/v1/event-set
Reads an event set.
Query Parameters
Headers
[{"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"}]
5. Start A Lesson
The last value you need to grab before reporting to an event set is the lessonResultId, this is found in the Start A Lesson response.
Without starting the lesson, you will not be able to report scores.
Indicates a student has started taking a lesson, updating the "start" date in the lesson's progress. If the user has previous started the lesson but not completed it, this method with throw an error.
Note that all query parameters in this request can optionally be included in the POST body rather than the query if so desired. Body parameters must be in the body, they cannot be included in the query string.
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 set, 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 View - Reported Event Set
This image shows an example reporting to an event-set module. The instructor can access this view by viewing, individual student progress for the event-module.
Create Statement
POSThttps://api.motar.io/edu/v1/xapi/statement
This endpoint creates an xAPI statement. See below for special keys needed for indexing your metrics.
Headers
Request Body
{ success:true}
Example
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" }}
7. Complete the Lesson
After reporting to an event set its important to Complete the Lesson, to ensure data is displayed accurately on the MOTAR Training Dashboard.
Update Student's Lesson Progress
POSThttps://api.motar.io/edu/v1/lesson/progress
Updates a student's progress for a lesson in a class with a score, answers, and a pass/fail result.
Note that all query parameters in this request can optionally be included in the POST body rather than the query if so desired. Body parameters must be in the body, they cannot be included in the query string.