@patch-adams/core 1.5.17 → 1.5.18
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 +16 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +16 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +16 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -2282,17 +2282,27 @@ function generateLrsBridgeCode(options) {
|
|
|
2282
2282
|
function updateCourseInfoFromApi(docData) {
|
|
2283
2283
|
if (!docData || !LRS.courseInfo) return;
|
|
2284
2284
|
|
|
2285
|
-
// Document GUID
|
|
2286
|
-
|
|
2285
|
+
// Document GUID \u2014 Bravais API GUID ALWAYS overrides baked-in GUID.
|
|
2286
|
+
// The baked-in GUID is a random UUID from wrap time. The Bravais GUID is the
|
|
2287
|
+
// canonical document identifier that Analytics uses to link statements to documents.
|
|
2288
|
+
// Without this override, our statements have a different object.id than cloudplayer
|
|
2289
|
+
// statements, so Analytics treats them as unrelated to the document.
|
|
2290
|
+
if (docData.guid) {
|
|
2291
|
+
if (LRS.courseInfo.guid && LRS.courseInfo.guid !== docData.guid) {
|
|
2292
|
+
log('Overriding baked-in GUID with Bravais GUID:', LRS.courseInfo.guid, '->', docData.guid);
|
|
2293
|
+
}
|
|
2287
2294
|
LRS.courseInfo.guid = docData.guid;
|
|
2288
2295
|
LRS.courseInfo.id = 'http://xyleme.com/bravais/document/' + docData.guid;
|
|
2289
|
-
log('
|
|
2296
|
+
log('Document GUID from API:', docData.guid);
|
|
2290
2297
|
}
|
|
2291
2298
|
|
|
2292
|
-
// Version GUID
|
|
2293
|
-
if (docData.latestVersion && docData.latestVersion.guid
|
|
2299
|
+
// Version GUID \u2014 same principle: Bravais version GUID must override baked-in
|
|
2300
|
+
if (docData.latestVersion && docData.latestVersion.guid) {
|
|
2301
|
+
if (LRS.courseInfo.versionGuid && LRS.courseInfo.versionGuid !== docData.latestVersion.guid) {
|
|
2302
|
+
log('Overriding baked-in version GUID:', LRS.courseInfo.versionGuid, '->', docData.latestVersion.guid);
|
|
2303
|
+
}
|
|
2294
2304
|
LRS.courseInfo.versionGuid = docData.latestVersion.guid;
|
|
2295
|
-
log('
|
|
2305
|
+
log('Version GUID from API:', docData.latestVersion.guid);
|
|
2296
2306
|
}
|
|
2297
2307
|
|
|
2298
2308
|
// Other metadata
|