Trigger attempted event the first time a user sees a question - HFJ-1397

pull/3/head
Svein-Tore Griff With 2015-11-27 20:40:48 +01:00
parent 93a6fbdfc9
commit 370c5c8803
1 changed files with 4 additions and 1 deletions

View File

@ -181,6 +181,7 @@ H5P.QuestionSet = function (options, contentId) {
if (questionInstances[questionNumber]) { if (questionInstances[questionNumber]) {
// Trigger resize on question in case the size of the QS has changed. // Trigger resize on question in case the size of the QS has changed.
var instance = questionInstances[questionNumber]; var instance = questionInstances[questionNumber];
instance.setActivityStarted();
if (instance.$ !== undefined) { if (instance.$ !== undefined) {
instance.trigger('resize'); instance.trigger('resize');
} }
@ -352,7 +353,9 @@ H5P.QuestionSet = function (options, contentId) {
// Function for attaching the multichoice to a DOM element. // Function for attaching the multichoice to a DOM element.
this.attach = function (target) { this.attach = function (target) {
if (this.isRoot()) {
this.setActivityStarted(); this.setActivityStarted();
}
if (typeof(target) === "string") { if (typeof(target) === "string") {
$myDom = $('#' + target); $myDom = $('#' + target);
} }