@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/cli.cjs
CHANGED
|
@@ -1832,16 +1832,9 @@ function generateLrsBridgeCode(options) {
|
|
|
1832
1832
|
name: scormLearnerId
|
|
1833
1833
|
}
|
|
1834
1834
|
};
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
var parts = scormLearnerName.split(',');
|
|
1839
|
-
actor.name = (parts[1] || '').trim() + ' ' + (parts[0] || '').trim();
|
|
1840
|
-
} else {
|
|
1841
|
-
actor.name = scormLearnerName;
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
log('Actor source: SCORM API');
|
|
1835
|
+
// Don't use SCORM student_name - it's unreliable ("Last, First" format varies by LMS).
|
|
1836
|
+
// The employee API lookup will provide the correct name and email.
|
|
1837
|
+
log('Actor source: SCORM API (id only, name from employee lookup)');
|
|
1845
1838
|
LRS.actor = actor;
|
|
1846
1839
|
return actor;
|
|
1847
1840
|
}
|
|
@@ -3649,6 +3642,27 @@ function generateLrsBridgeCode(options) {
|
|
|
3649
3642
|
* because the bridge initializes in <head> before LMSInitialize runs.
|
|
3650
3643
|
*/
|
|
3651
3644
|
LRS.refreshActor = function(callback) {
|
|
3645
|
+
// If SCORM API wasn't found during <head> init, re-scan now
|
|
3646
|
+
// (some LMS inject window.API after page starts loading)
|
|
3647
|
+
if (!LRS.scormApi) {
|
|
3648
|
+
log('refreshActor: SCORM API missing, re-scanning...');
|
|
3649
|
+
var api2004 = findAPIInFrameHierarchy('API_1484_11', 10);
|
|
3650
|
+
if (api2004) {
|
|
3651
|
+
LRS.scormApi = api2004.api;
|
|
3652
|
+
LRS.scormApiFound = true;
|
|
3653
|
+
LRS.scormApiType = '2004';
|
|
3654
|
+
log('refreshActor: found SCORM 2004 API');
|
|
3655
|
+
} else {
|
|
3656
|
+
var api12 = findAPIInFrameHierarchy('API', 10);
|
|
3657
|
+
if (api12) {
|
|
3658
|
+
LRS.scormApi = api12.api;
|
|
3659
|
+
LRS.scormApiFound = true;
|
|
3660
|
+
LRS.scormApiType = '1.2';
|
|
3661
|
+
log('refreshActor: found SCORM 1.2 API');
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3652
3666
|
// Always-visible diagnostic: confirm refreshActor is being called and show SCORM data (TEMPORARY)
|
|
3653
3667
|
if (window.console && window.console.info) {
|
|
3654
3668
|
var scormId = 'n/a', scormName = 'n/a';
|