Trigger attempted event the first time a user sees a question - HFJ-1397
parent
93a6fbdfc9
commit
370c5c8803
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue