Skip to content

Commit

Permalink
Ji 6771 include session id in xapi statements (#83)
Browse files Browse the repository at this point in the history
* JI-6771 include session ID in xAPI statements

* JI-6771 check if xApiSessionId exists

* JI-6771 remove unnecessary comma

* JI-6771 bump

---------

Co-authored-by: devland <[email protected]>
  • Loading branch information
makmentins and devland authored Oct 28, 2024
1 parent 3f19d9e commit 1f2d338
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions js/xapi-event-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ H5P.Summary.XApiEventBuilder = (function ($, EventDispatcher) {
]
}
};

if (H5P.xApiSessionId) {
event.data.statement.context.extensions = {
'https://h5p.com/xapi/session-id': H5P.xApiSessionId
};
}
}

event.data.statement.object = {
Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Test your users with fill in the summary tasks.",
"majorVersion": 1,
"minorVersion": 10,
"patchVersion": 21,
"patchVersion": 22,
"runnable": 1,
"embedTypes": [
"iframe"
Expand Down Expand Up @@ -60,4 +60,4 @@
"minorVersion": 0
}
]
}
}

0 comments on commit 1f2d338

Please sign in to comment.