How to Use The Event Set Module
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.
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
Lists All Courses
GET
https://api.motar.io/edu/v1/course/list
Lists all courses.
Query Parameters
Name | Type | Description |
---|---|---|
limit | number | Page size, defaults to 10. |
page | number | Results page to return, defaults to 1. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Auth token generated by user login. |
2. Lists Lessons in a Course
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.
Lists Lessons in a Course
GET
https://api.motar.io/edu/v1/lesson/course
Lists all lessons belonging to a course.
Query Parameters
Name | Type | Description |
---|---|---|
courseId | string | ID of the course. |
limit | number | Page size. |
page | number | Results page to return. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Auth token generated by user login. |
3. Get Classes
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 Classes
GET
https://api.motar.io/edu/v1/class/list
Returns a student class list.
Query Parameters
Name | Type | Description |
---|---|---|
page | string | Results page to retrieve. |
limit | string | Page size. Defaults to 10. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Auth token generated by user login. |
4. Read an Event Set
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
GET
https://api.motar.io/edu/v1/event-set
Reads an event set.
Query Parameters
Name | Type | Description |
---|---|---|
eventSetId | string | The ID of an event set or the ID of an event set lesson. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Authentication token generated by user tokens. |
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.
Start A Lesson
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.
Query Parameters
Name | Type | Description |
---|---|---|
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. |
Headers
Name | Type | Description |
---|---|---|
string |
6. Report to an event set
Event SetxAPIReferenced 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.
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
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.
Headers
Name | Type | Description |
---|---|---|
Authorization | string |
Request Body
Name | Type | Description |
---|---|---|
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.
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
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.
Query Parameters
Name | Type | Description |
---|---|---|
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. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Auth token generated by user login. |
Request Body
Name | Type | Description |
---|---|---|
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. |
Last updated