@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/index.js
CHANGED
|
@@ -2890,7 +2890,8 @@ function generateLrsBridgeCode(options) {
|
|
|
2890
2890
|
sendStatement(statement);
|
|
2891
2891
|
};
|
|
2892
2892
|
|
|
2893
|
-
// Content/Page viewed - uses
|
|
2893
|
+
// Content/Page viewed - uses page-specific object for human-readable display
|
|
2894
|
+
// Object shows page/lesson title, parent context maintains document aggregation
|
|
2894
2895
|
LRS.contentOpened = function(data) {
|
|
2895
2896
|
if (!TRACK_NAVIGATION) return;
|
|
2896
2897
|
|
|
@@ -2910,31 +2911,31 @@ function generateLrsBridgeCode(options) {
|
|
|
2910
2911
|
lessonId = lessonId.substring(2); // Remove '#/'
|
|
2911
2912
|
}
|
|
2912
2913
|
|
|
2913
|
-
//
|
|
2914
|
+
// Get the page title - prefer lesson name from DOM
|
|
2915
|
+
var pageTitle = data.title || lessonInfo.name || 'Page';
|
|
2916
|
+
|
|
2917
|
+
// Build page activity object with human-readable name
|
|
2918
|
+
// This shows the page/lesson title in the Object column
|
|
2919
|
+
var pageObject = buildPageActivityObject({
|
|
2920
|
+
pageGuid: lessonId,
|
|
2921
|
+
name: pageTitle,
|
|
2922
|
+
resourceType: 'Lesson'
|
|
2923
|
+
});
|
|
2924
|
+
|
|
2925
|
+
// Add page info to context extensions
|
|
2914
2926
|
var additionalContext = {
|
|
2915
2927
|
extensions: {
|
|
2916
2928
|
pageId: lessonId || 'home',
|
|
2917
|
-
pageTitle:
|
|
2929
|
+
pageTitle: pageTitle,
|
|
2918
2930
|
lessonName: lessonInfo.name,
|
|
2919
2931
|
sectionName: lessonInfo.sectionName,
|
|
2920
2932
|
pageUrl: data.url || window.location.href
|
|
2921
2933
|
}
|
|
2922
2934
|
};
|
|
2923
2935
|
|
|
2924
|
-
// Use
|
|
2925
|
-
//
|
|
2926
|
-
var statement =
|
|
2927
|
-
'experienced',
|
|
2928
|
-
'http://xyleme.com/bravais/activities/document',
|
|
2929
|
-
{
|
|
2930
|
-
event: 'page_viewed',
|
|
2931
|
-
pageId: lessonId,
|
|
2932
|
-
lessonName: lessonInfo.name,
|
|
2933
|
-
sectionName: lessonInfo.sectionName
|
|
2934
|
-
},
|
|
2935
|
-
result,
|
|
2936
|
-
additionalContext
|
|
2937
|
-
);
|
|
2936
|
+
// Use 'experienced' verb for viewing content
|
|
2937
|
+
// Parent course activity added by buildXylemeContext ensures document aggregation
|
|
2938
|
+
var statement = buildStatementXyleme('experienced', pageObject, result, additionalContext);
|
|
2938
2939
|
sendStatement(statement);
|
|
2939
2940
|
};
|
|
2940
2941
|
|