SCORM-to-xAPI Wrapper
Kurzbeschreibung
Ziele
Aufgrund der weiten Verbreitung des E-Learning Standards SCORM aus dem Jahr 2000 muss eine Abwärtskompatibilität gewährleistet werden. Die Entwicklung eines „SCORM-to-xAPI“ Wrappers soll SCORM-Aktivitäten in maschinenlesbare xAPI Statements umwandeln, um eine konsistente Datenspeicherung zu ermöglichen.
Das Modul kann in Kombination mit jeder beliebigen Lernplattform zum Einsatz kommen.
GIT Repository mit Beispiel
Scope of this repository
The purpose of this project is to provide a quick, easy way to implement both SCORM 1.2 Run-Time API and SCORM 2004 Run-Time API while it handles automated conversion of SCORM Data Model elements to associated xAPI statements to allow xAPI tracking in your SCORM packages. Those xAPI statements can be stored in a xAPI compatible LRS like, for example, Learning Locker.
Scope of this repository
The purpose of this project is to provide a quick, easy way to implement both SCORM 1.2 Run-Time API and SCORM 2004 Run-Time API while it handles automated conversion of SCORM Data Model elements to associated xAPI statements to allow xAPI tracking in your SCORM packages. Those xAPI statements can be stored in a xAPI compatible LRS like, for example, Learning Locker.
Configuration
You will need to set several configuration values in order for the wrappers to communicate with the LRS:
{
"lrs":{
"endpoint":"https://lrs-eu-central-1.eduplex.eu/data/xAPI/",
"user":"64b9634d139ecf5d77ec8bf335c582c8ee374f5",
"password":"password1234"
},
"courseId":"https://scorm.com/golf-example",
"lmsHomePage":"http://lms.adlnet.gov",
"isScorm2004":false,
"activityId":"https://scorm.com/golf-example/activity/test",
"groupingContextActivity":{
"definition": {
"name": {
"en-US": "My Golf Example"
},
"description": {
"en-US": "My Golf Example happening from 2022"
}
},
"id": "https://scorm.com/golf-example/demo/test",
"objectType": "Activity"
}
}
The most important properties are:
lrs.endpoint
Should define the URL where the LRS is located (it could be just the domain or it could include also a path prefix ending with/
)lrs.user
Username or access key from the LRS clientlrs.password
Password or secret from the LRS clientisScorm2004
Should define if the SCORM 2004 or SCORM 1.2activityId
Unique identifier of this SCORM package in the LRS
Try it yourself
You can clone the repository to test yourself the functionality. Keep in mind you will need a web server serving all files, otherwise the browser will block requests due to CORS. You need the whole repository as it is in order to make the example files work correctly.
You would need to add your LRS configuration and credentials in the function called getXapiConfig from the file demo/index.js
. After that you are ready to try it. Access index.html which will load a simple SCORM package (already part of this project) where you can do some clicks and answer a test.
With each interaction you will be sending data to the LRS as xAPI statements that you can check in your LRS dashboard. The state of the progress will also be stored in the LRS. You can replace the ExampleScorm package with any other package of your choice, just remember to unzip the original package and use the same directory name.
Other considerations
- It is important the iframe with the SCORM is loaded after all the javascript code is executed, all window objects are created and event listeners are set.
- This project implementation results in a lot of HTTP requests each time there is an interaction from the user. To reduce this amount we added a delay (implemented with
setTimeout
indemo/index.js
) in the event that triggers the request to update the attempt state in the LRS. But this is not strictly necessary in order to work. - The versions of SCORM supported are 1.2 and 2004. Make sure to provide the right version through isScorm2004 field in the xAPI configuration object and also in the init method.
- This test repository was tested with Learning Locker
How does it work
In order to start tracking SCORM courses with xAPI statements first we need to store the LRS configuration, create some window objects which are required in the wrapper files and set some event listenners to convert SCORM actions to xAPI. Most of this objects and functions are provided by the files mentioned in the first section of this project. You will only need to provide some small configuration or make changes in the behaviour of the events if you want to add extra functionality.
You will just need to call this init method before loading your SCORM package on an iframe.
You can check an example of the implementation on the file demo/index.js
. In this file would be important to change the following variables:
isScorm2004
Depending on the version used: SCORM 2004 or SCORM 1.2actorId
Unique identifier for the learner/student
The idea of this file is to overwrite some needed values and implement some event handlers. This is just a proof of concept, but adapting this code into any platform or application should be easy. It has been proven to work on an SPA (single page application)
Veröffentlichung &
Lizenzierung
The source code for the site is licensed under the MIT license, which you can find in the LICENSE file.
The ExampleScorm files are downloaded from the SCORM – Golf Examples site by Rustici Software LLC. It is licensed under Creative Commons Attribution 3.0 United States License. All credits to the creator of the original demo content, no changes were made on this content.
Kontaktaufnahme
Wir beraten Sie gerne zu all Ihren Fragen rund um die veröffentlichte Software. Bitte nehmen Sie zur Kenntnis, dass wir keine Garantie oder Gewährleistung auf veröffentlichte Ergebnisse oder Teilergebnisse geben.
Ich stimme einer Kontaktaufnahme zu und habe die Datenschutzerklärung zur Kenntnis genommen.
Kontakt
+49 (0)3683 688 4112
Prof. Dr. Regina Polster
Hochschule Schmalkalden
Fakultät Informatik
Blechhammer 4-9
98574 Schmalkalden
technische Fragen
DI Alexander Schmid
courseticket Deutschland GmbH
alexander.schmid@courseticket.com
+43 (0)660 778 779 1 (Werktags, 9:00 - 17:00 Uhr)