@patch-adams/core 1.5.9 → 1.5.10

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/index.js CHANGED
@@ -3378,6 +3378,22 @@ function generateLrsBridgeCode(options) {
3378
3378
  sendStatement(statement);
3379
3379
  };
3380
3380
 
3381
+ // Send a "launched" statement \u2014 called by skin after email gate / actor setup
3382
+ LRS.sendLaunchStatement = function(data) {
3383
+ data = data || {};
3384
+ var activityDetails = {
3385
+ launchSource: data.source || 'email-gate',
3386
+ employeeEmail: data.email || (LRS.actor && LRS.actor.mbox ? LRS.actor.mbox.replace('mailto:', '') : undefined),
3387
+ employeeId: data.employeeId || LRS.employeeId || undefined
3388
+ };
3389
+
3390
+ if (data.employeeName) activityDetails.employeeName = data.employeeName;
3391
+
3392
+ var statement = buildStatement('launched', ACTIVITY_TYPES.course, activityDetails, null, null);
3393
+ log('Sending launch statement for:', activityDetails.employeeEmail || '(unknown)');
3394
+ sendStatement(statement);
3395
+ };
3396
+
3381
3397
  /**
3382
3398
  * Re-extract actor from SCORM after LMSInitialize has been called.
3383
3399
  * Call this from the SCORM wrapper after scormInit() succeeds,