From 370c5c88031c9208fa2f65894b42df3dccac3306 Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Fri, 27 Nov 2015 20:40:48 +0100 Subject: [PATCH] Trigger attempted event the first time a user sees a question - HFJ-1397 --- js/questionset.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/questionset.js b/js/questionset.js index 86ce470..dd4b4a5 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -181,6 +181,7 @@ H5P.QuestionSet = function (options, contentId) { if (questionInstances[questionNumber]) { // Trigger resize on question in case the size of the QS has changed. var instance = questionInstances[questionNumber]; + instance.setActivityStarted(); if (instance.$ !== undefined) { instance.trigger('resize'); } @@ -352,7 +353,9 @@ H5P.QuestionSet = function (options, contentId) { // Function for attaching the multichoice to a DOM element. this.attach = function (target) { - this.setActivityStarted(); + if (this.isRoot()) { + this.setActivityStarted(); + } if (typeof(target) === "string") { $myDom = $('#' + target); }