Events
This article describes the Events that Reports API provides, and details how the to bind function callbacks to these events.
Supported Events
Reports API provides methods which provide the ability to bind callback functions to particular events, usually triggered by user actions, or specific events occurring in a report.
To learn more about how to bind to these events, please see the on() method for the Report Object on our Methods section.
Example
var report = reportsApp.getReport("report-1");
report.on("load:data", function(data) {
console.log("this item has been loaded with the following data: ", data);
});
Common events
Common events are events that are shared between all reports, and provide mechanisms such as accessing raw data behind a report.
Event name | Description | Event data |
---|---|---|
load:data
|
This event is raised when a report has successfully pulled down the data it needs to render from Learnosity infrastructure.
|
|
Click events
Click events are events that are provided by certain reports, to provide mechanisms to bind to specific click events within the report.
They are not available on every report - the specific reports that can use these events are noted below
Event name | Description | Event data |
---|---|---|
click:activity
|
This event is raised when someone clicks on the 'activity' field in certain reports. This functionality is available in: |
|
click:progress
|
This event is raised when someone clicks on the 'progress' field in certain reports. This functionality is available in: |
|
click:score
|
This event is raised when someone clicks on the 'score' field in certain reports. For different report types, the callback will be passed different event data as follows. Callback receives Callback receives |
|
click:session
|
This event is raised when someone clicks on the 'session' field in certain reports. This functionality is available in: |
|
click:tag
|
This event is raised when someone clicks on the 'tag' field in certain reports. This functionality is available in: |
|
click:user
|
This event is raised when someone clicks on the 'user' field in certain reports. For different report types, the callback will be passed different event data as follows. Callback receives Callback receives |
|
API Ready events
API ready events are events that are provided by certain reports, to provide mechanisms to access the underlying Assessment API used to render the items and questions.
They are not available on every report - the specific reports that can use these events are noted below
Event name | Description | Event data |
---|---|---|
ready:itemsApi
|
This event is raised when Reports API has used Items API to render a visual report, showing the students responses. This functionality is available in: |
|
ready:questionsApi
|
This event is raised when Reports API has used Questions API to render a visual report, showing the students responses. This functionality is available in: |
|
Live progress events
Live progress events are events that are provided by certain reports, to provide mechanisms to bind to events raised through Learnosity's Events API.
They are only available when using the live-activitystatus-by-user report.
Event name | Description | Event data |
---|---|---|
start
|
Student started test. eg, "Start" button clicked. |
|
paused
|
Student paused test. eg, A modal has been opened. |
|
resumed
|
Student resumed test. eg, A modal has been closed. |
|
suspended
|
Student saved and quitted test. eg, "Quit" button clicked. |
|
submit
|
Test submitted successfully. |
|
terminate
|
Test(session) abandoned. |
|
progressed
|
Student navigated to another item. |
|
consumed
|
Audio playback completed or stopped. |
Aggregate report events
Click events are events that are provided by certain reports, to provide mechanisms to bind to specific click events within the report.
They are not available on every report - the specific reports that can use these events are noted below
Event name | Description | Event data |
---|---|---|
change:data
|
This event is raised in large scale aggregate reports, when users take an action that causes the report to pull new information. This functionality is available in: Fires after the data for a new group_path is loaded, in response to user navigation or a call to viewGroup().
The event handler is passed the raw data object for the newly loaded group_path.
The object structure is equivalent to that available via getGroup(). |
|