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