How to Use The Event Set Module
Last updated
Last updated
bout the Event Set Module
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.
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.
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
GET
https://api.motar.io/edu/v1/course/list
Lists all courses.
limit
number
Page size, defaults to 10.
page
number
Results page to return, defaults to 1.
Authorization
string
Auth token generated by user login.
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.
GET
https://api.motar.io/edu/v1/lesson/course
Lists all lessons belonging to a course.
courseId
string
ID of the course.
limit
number
Page size.
page
number
Results page to return.
Authorization
string
Auth token generated by user login.
Next we need to grab the classId value for your course. This is the last value you need to grab before interacting with student data.
GET
https://api.motar.io/edu/v1/class/list
Returns a student class list.
page
string
Results page to retrieve.
limit
string
Page size. Defaults to 10.
Authorization
string
Auth token generated by user login.
Reporting to an event set requries the eventSetId, this request will give you the next value needed for reporting to an event set.
GET
https://api.motar.io/edu/v1/event-set
Reads an event set.
eventSetId
string
The ID of an event set or the ID of an event set lesson.
Authorization
string
Authentication token generated by user tokens.
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.
POST
https://api.motar.io/edu/v1/lesson/progress/start
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.
classId
string
Lesson progress is tracked on a class-class basis. This parameter is the ID of the student's class for which you would like to update progress.
lessonId
string
ID of lesson.
string
Referenced from the linked page above:
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.
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.
POST
https://api.motar.io/edu/v1/xapi/statement
This endpoint creates an xAPI statement. See below for special keys needed for indexing your metrics.
Authorization
string
timestamp
string
A parseable ISO date (eg. 2020-01-07T21:45:35.649Z)
actor
string
User ID of the actor performing the action.
verb
string
Action that the actor is carying out on the object.
object
string
Target of the action the user is carrying out. This is expected to be a JSON object (stringified or raw)
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.
After reporting to an event set its important to Complete the Lesson, to ensure data is displayed accurately on the MOTAR Training Dashboard.
POST
https://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.
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to retrieve progress in this lesson for.
lessonId
string
ID of the lesson.
Authorization
string
Auth token generated by user login.
startTime
string
A parseable date to mark the start of the student's session. Suggested format is ISO date, eg. 2020-01-07T21:45:35.649Z.
endTime
string
A parseable date to mark the end of the student's session. Suggested format is ISO date, eg. 2020-01-07T21:45:35.649Z.
complete
boolean
If true, the lesson's "complete" attribute will be set to the current date/time, indicating the student has finished the lesson.
score
number
A numeric score for the lesson. If using Point-based scoring, send in the number correct, eg. Point-based score pass = 40/50, then 'score' is a number 0-50. Not required for Pass/Fail scored lessons.
pass
boolean
A boolean pass/fail flag.