From 5d32c4451cbb6a6946e46456c3cb1b5ce75601e7 Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Sun, 2 Nov 2014 21:30:19 +0100 Subject: [PATCH] Add real url to statement object --- js/h5p.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index 0e47ece..7cf7388 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -491,13 +491,10 @@ H5P.XAPIEvent.prototype.setVerb = function(verb) { } H5P.XAPIEvent.prototype.setObject = function(instance) { - // TODO: Implement the correct id(url) - - // Return dummy data... this.statement.object = { - 'id': 'http://mysite.com/path-to-main-activity#sub-activity', - 'contentId': instance.contentId, - 'reference': instance + // TODO: Correct this. contentId might be vid + 'id': window.location.origin + Drupal.settings.basePath + 'node/' + instance.contentId, + 'contentId': instance.contentId } }