JI-2533 QS implement 'getContext()' (#81)
Co-authored-by: Ravi Majithia <ravikiran.majithia@joubel.com>stable
parent
d0dc718ff6
commit
e941f693cd
|
@ -1240,6 +1240,18 @@ H5P.QuestionSet = function (options, contentId, contentData) {
|
||||||
children: getXAPIDataFromChildren(this)
|
children: getXAPIDataFromChildren(this)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get context data.
|
||||||
|
* Contract used for confusion report.
|
||||||
|
*/
|
||||||
|
this.getContext = function () {
|
||||||
|
// Get question index and add 1, count starts from 0
|
||||||
|
return {
|
||||||
|
type: 'question',
|
||||||
|
value: (currentQuestion + 1)
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
H5P.QuestionSet.prototype = Object.create(H5P.EventDispatcher.prototype);
|
H5P.QuestionSet.prototype = Object.create(H5P.EventDispatcher.prototype);
|
||||||
|
|
Loading…
Reference in New Issue