diff --git a/js/h5p-x-api-event.js b/js/h5p-x-api-event.js index cc7fd66..e5d6368 100644 --- a/js/h5p-x-api-event.js +++ b/js/h5p-x-api-event.js @@ -308,5 +308,10 @@ H5P.XAPIEvent.allowedXAPIVerbs = [ 'shared', 'suspended', 'terminated', - 'voided' + 'voided', + + // Custom verbs used for action toolbar below content + 'downloaded', + 'accessed-embed', + 'accessed-copyright' ]; diff --git a/js/h5p.js b/js/h5p.js index e4d0138..88a9666 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -158,16 +158,19 @@ H5P.init = function (target) { actionBar.on('download', function () { window.location.href = contentData.exportUrl; + instance.triggerXAPI('downloaded'); }); actionBar.on('copyrights', function () { var dialog = new H5P.Dialog('copyrights', H5P.t('copyrightInformation'), copyrights, $container); dialog.open(); + instance.triggerXAPI('accessed-copyright'); }); actionBar.on('embed', function () { H5P.openEmbedDialog($actions, contentData.embedCode, contentData.resizeCode, { width: $element.width(), height: $element.height() }); + instance.triggerXAPI('accessed-embed'); }); if (actionBar.hasActions()) {