From db69bc60a36ba19bf3b72ce03bbda251dd3eae91 Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Sat, 28 Nov 2015 21:00:16 +0100 Subject: [PATCH] Add question number to interactions - HFJ-1400 --- js/questionset.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/questionset.js b/js/questionset.js index dd4b4a5..9f931d8 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -439,6 +439,10 @@ H5P.QuestionSet = function (options, contentId) { // An activity within this activity is not allowed to send completed events event.setVerb('answered'); } + if (event.data.statement.context.extensions === undefined) { + event.data.statement.context.extensions = []; + } + event.data.statement.context.extensions['http://id.tincanapi.com/extension/ending-point'] = currentQuestion + 1; }); if (question.getAnswerGiven()) { $('.progress-dot:eq(' + i +')', $myDom).removeClass('unanswered').addClass('answered');