From 61eb998d48b1e927c0181a18984e17747f937a47 Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Wed, 14 Jan 2015 17:27:32 +0100 Subject: [PATCH] Add xAPI todo list --- js/h5p.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/js/h5p.js b/js/h5p.js index 3afb4c4..5595b4f 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -155,6 +155,28 @@ H5P.init = function () { }); }; +/* + * TODO xAPI: + * 1. Create a xAPI.js file and move xAPI code there (public) + * 2. Be able to listen for events from both div and iframe embedded content + * via the same API (this is about adding communication between the iframe and + * it's parent and make sure that the parent distributes the events from the + * iframe) (public) + * 3. Create a separate Drupal module that is able to listen for events from + * both div and iframe embedded content and send them to analytics (custom for Zavango) + * 4. Move the event system code to a separate file (public) + * 5. Make sure the helper functions provides all the relevant data, example values + * and time spent (public) + * 6. Add documentation to the functions (public) + * 7. Add xAPI events to all the basic questiontype: + * 7.1 Multichoice + * 7.2 Fill in the blanks + * 7.3 Drag and drop + * 7.4 Drag the words + * 7.5 Mark the words + * 8. Add xAPI events to interactive video + */ + H5P.xAPIListener = function(event) { if ('verb' in event.statement) { if (event.statement.verb.id === 'http://adlnet.gov/expapi/verbs/completed') {