@patch-adams/core 1.4.23 → 1.4.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +24 -10
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +24 -10
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +24 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1492,16 +1492,9 @@ function generateLrsBridgeCode(options) {
|
|
|
1492
1492
|
name: scormLearnerId
|
|
1493
1493
|
}
|
|
1494
1494
|
};
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
var parts = scormLearnerName.split(',');
|
|
1499
|
-
actor.name = (parts[1] || '').trim() + ' ' + (parts[0] || '').trim();
|
|
1500
|
-
} else {
|
|
1501
|
-
actor.name = scormLearnerName;
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
log('Actor source: SCORM API');
|
|
1495
|
+
// Don't use SCORM student_name - it's unreliable ("Last, First" format varies by LMS).
|
|
1496
|
+
// The employee API lookup will provide the correct name and email.
|
|
1497
|
+
log('Actor source: SCORM API (id only, name from employee lookup)');
|
|
1505
1498
|
LRS.actor = actor;
|
|
1506
1499
|
return actor;
|
|
1507
1500
|
}
|
|
@@ -3309,6 +3302,27 @@ function generateLrsBridgeCode(options) {
|
|
|
3309
3302
|
* because the bridge initializes in <head> before LMSInitialize runs.
|
|
3310
3303
|
*/
|
|
3311
3304
|
LRS.refreshActor = function(callback) {
|
|
3305
|
+
// If SCORM API wasn't found during <head> init, re-scan now
|
|
3306
|
+
// (some LMS inject window.API after page starts loading)
|
|
3307
|
+
if (!LRS.scormApi) {
|
|
3308
|
+
log('refreshActor: SCORM API missing, re-scanning...');
|
|
3309
|
+
var api2004 = findAPIInFrameHierarchy('API_1484_11', 10);
|
|
3310
|
+
if (api2004) {
|
|
3311
|
+
LRS.scormApi = api2004.api;
|
|
3312
|
+
LRS.scormApiFound = true;
|
|
3313
|
+
LRS.scormApiType = '2004';
|
|
3314
|
+
log('refreshActor: found SCORM 2004 API');
|
|
3315
|
+
} else {
|
|
3316
|
+
var api12 = findAPIInFrameHierarchy('API', 10);
|
|
3317
|
+
if (api12) {
|
|
3318
|
+
LRS.scormApi = api12.api;
|
|
3319
|
+
LRS.scormApiFound = true;
|
|
3320
|
+
LRS.scormApiType = '1.2';
|
|
3321
|
+
log('refreshActor: found SCORM 1.2 API');
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3312
3326
|
// Always-visible diagnostic: confirm refreshActor is being called and show SCORM data (TEMPORARY)
|
|
3313
3327
|
if (window.console && window.console.info) {
|
|
3314
3328
|
var scormId = 'n/a', scormName = 'n/a';
|