@patch-adams/core 1.4.10 → 1.4.11
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 +18 -17
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +18 -17
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +18 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3225,7 +3225,8 @@ function generateLrsBridgeCode(options) {
|
|
|
3225
3225
|
sendStatement(statement);
|
|
3226
3226
|
};
|
|
3227
3227
|
|
|
3228
|
-
// Content/Page viewed - uses
|
|
3228
|
+
// Content/Page viewed - uses page-specific object for human-readable display
|
|
3229
|
+
// Object shows page/lesson title, parent context maintains document aggregation
|
|
3229
3230
|
LRS.contentOpened = function(data) {
|
|
3230
3231
|
if (!TRACK_NAVIGATION) return;
|
|
3231
3232
|
|
|
@@ -3245,31 +3246,31 @@ function generateLrsBridgeCode(options) {
|
|
|
3245
3246
|
lessonId = lessonId.substring(2); // Remove '#/'
|
|
3246
3247
|
}
|
|
3247
3248
|
|
|
3248
|
-
//
|
|
3249
|
+
// Get the page title - prefer lesson name from DOM
|
|
3250
|
+
var pageTitle = data.title || lessonInfo.name || 'Page';
|
|
3251
|
+
|
|
3252
|
+
// Build page activity object with human-readable name
|
|
3253
|
+
// This shows the page/lesson title in the Object column
|
|
3254
|
+
var pageObject = buildPageActivityObject({
|
|
3255
|
+
pageGuid: lessonId,
|
|
3256
|
+
name: pageTitle,
|
|
3257
|
+
resourceType: 'Lesson'
|
|
3258
|
+
});
|
|
3259
|
+
|
|
3260
|
+
// Add page info to context extensions
|
|
3249
3261
|
var additionalContext = {
|
|
3250
3262
|
extensions: {
|
|
3251
3263
|
pageId: lessonId || 'home',
|
|
3252
|
-
pageTitle:
|
|
3264
|
+
pageTitle: pageTitle,
|
|
3253
3265
|
lessonName: lessonInfo.name,
|
|
3254
3266
|
sectionName: lessonInfo.sectionName,
|
|
3255
3267
|
pageUrl: data.url || window.location.href
|
|
3256
3268
|
}
|
|
3257
3269
|
};
|
|
3258
3270
|
|
|
3259
|
-
// Use
|
|
3260
|
-
//
|
|
3261
|
-
var statement =
|
|
3262
|
-
'experienced',
|
|
3263
|
-
'http://xyleme.com/bravais/activities/document',
|
|
3264
|
-
{
|
|
3265
|
-
event: 'page_viewed',
|
|
3266
|
-
pageId: lessonId,
|
|
3267
|
-
lessonName: lessonInfo.name,
|
|
3268
|
-
sectionName: lessonInfo.sectionName
|
|
3269
|
-
},
|
|
3270
|
-
result,
|
|
3271
|
-
additionalContext
|
|
3272
|
-
);
|
|
3271
|
+
// Use 'experienced' verb for viewing content
|
|
3272
|
+
// Parent course activity added by buildXylemeContext ensures document aggregation
|
|
3273
|
+
var statement = buildStatementXyleme('experienced', pageObject, result, additionalContext);
|
|
3273
3274
|
sendStatement(statement);
|
|
3274
3275
|
};
|
|
3275
3276
|
|