CMI5 is the new generation of SCORM. It defines a set of statements that CMI5 contents must record, as well as a packaging format and a launch mechanism.
If you want to make you LMS CMI5 compliant, you have a few options:
All these options have their own benefits and drawbacks. However, the 3rd one requires less development on the LMS side and delegates more responsabilities to the LRS.
TRAX LRS provides all you need for make a robust integration with your LMS in order to support CMI5:
In order to get access to the token delivery API,
your LMS must have the Create CMI5 tokens
permission in TRAX LRS.
To know the endpoint of the token delivery API, get the LMS access endpoint,
and replace xapi/std
by xapi/cmi5/tokens
at the end of the URL.
The API has a single GET
method which takes 3 mandatory parameters.
Parameter | Description |
---|---|
activity_id | The ID of the CMI5 activity (IRI). |
agent | The agent launching the CMI5 activity (JSON encoded). |
origin | The content host that will be used in CORS policy. |
The API returns a JSON document with the endpoint and token that must be used by the CMI5 content.
{
"endpoint": "http://lrsdev.test/trax/api/48a85a15-b742-4ab4-b7ec-4e48d77b8f24/xapi/std",
"token": "NTJlY2FhNzItYmFjOS00NWVhLWJlYjItMzczMTMwNWMyZTdiOjNhZDQ2YWIwLTIwY2EtNDZjNS1iY2RlLWQxMTVjNWVmOGM2NQ==",
}
The CMI5 tokens lifetime is set to 60
minutes by default.
You can change this value in your .env
file.
CMI5_TOKEN_LIFETIME=60
The following command must be ran on a regular basis to remove the expired tokens. We recommend to setup a CRON job.
php artisan cmi5:cleanup-tokens
TRAX LRS provides specific endpoints for the CMI5 contents, with a set of security rules applying on the standard APIs.
403 error
.403 error
.403 error
.403 error
.403 error
.403 error
.At any time, your LMS may need to know the status for a given learner and CMI5 content, for example to display this status on the launching page.
This can be achieved with the GET
method of the standard Statement API
and the following parameters:
Parameter | Description |
---|---|
agent | The agent launching the CMI5 activity (JSON encoded). |
activity | The ID of the CMI5 activity (IRI). |
registration | The registration ID (UUID). |
If you want to build some reporting features in your LMS, you need to get CMI5 data in an efficient way. For example, you could use a CRON job to get all the recent CMI5 data from the LRS and store it in the LMS database.
This can be achieved with the GET
method of the standard Statement API
and the following parameters:
Parameter | Description |
---|---|
activity | Use https://w3id.org/xapi/cmi5/context/categories/cmi5 to target the CMI5 statements. |
related_activities | Use true because the above activity is in the context of the statements. |
ascending | Use true to get statements from the older to the newer. |
limit | To limit the number of returned statements. |
The LRS response will include a more
URL that can be used to get more paginated statements.