From cc455f2b2d3bd4f8513744040d36401508d13010 Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Mon, 17 Nov 2014 11:08:43 +0100 Subject: [PATCH] Implement changes after testing against Scrom Cloud --- js/h5p.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index 08f4f84..7a054b3 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -512,7 +512,8 @@ H5P.XAPIEvent.prototype.setObject = function(instance) { this.statement.object = { // TODO: Correct this. contentId might be vid 'id': window.location.origin + Drupal.settings.basePath + 'node/' + instance.contentId, - 'contentId': instance.contentId + //'contentId': instance.contentId, + 'objectType': 'Activity' } } @@ -543,7 +544,12 @@ H5P.EventEnabled.prototype.createXAPIEventTemplate = function(verb, extra) { H5P.getActor = function() { - return H5PIntegration.getActor(); + var user = H5PIntegration.getUser(); + return { + 'name': user.name, + 'mbox': 'mailto:' . user.mail, + 'objectType': 'Agent' + } } H5P.XAPIEvent.allowedXAPIVerbs = [