Add question number to interactions - HFJ-1400

pull/3/head
Svein-Tore Griff With 2015-11-28 21:00:16 +01:00
parent 370c5c8803
commit db69bc60a3
1 changed files with 4 additions and 0 deletions

View File

@ -439,6 +439,10 @@ H5P.QuestionSet = function (options, contentId) {
// An activity within this activity is not allowed to send completed events // An activity within this activity is not allowed to send completed events
event.setVerb('answered'); 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()) { if (question.getAnswerGiven()) {
$('.progress-dot:eq(' + i +')', $myDom).removeClass('unanswered').addClass('answered'); $('.progress-dot:eq(' + i +')', $myDom).removeClass('unanswered').addClass('answered');