-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The Rustici engine used in SCORM Cloud uses an invalid actor structure. Incorrect attribute names are used, plus the values of these are stored in an Array which doesn't match the xAPI spec.
Whilst we have been aware of this issue for a long time, I am noting it here for others. It was previously decided not to amend the plugin to convert this as required, as the engine should match the spec rather than the plugin providing a workaround. If required, the following code can be added before:
Lines 36 to 39 in 8b15dd7
| const launchData = { | |
| registration: lrs.registration || null, | |
| actor: JSON.parse(lrs.actor) | |
| }; |
var actor = JSON.parse(lrs.actor);
// convert actor for Rustici Engine
if (Array.isArray(actor.name)) actor.name = actor.name[0];
//if (Array.isArray(actor.mbox)) actor.mbox = actor.mbox[0];
if (Array.isArray(actor.account)) {
var accountArr = actor.account[0];
var account = {
homePage: accountArr.accountServiceHomePage || accountArr.homePage,
name: accountArr.accountName || accountArr.name
};
actor.account = account;
}The following actor value needs to be adjusted accordingly to pass in the new actor variable instead:
Line 37 in 8409e1b
| 'actor': JSON.parse(lrs.actor),/*, |