JI-2533 QS implement 'getContext()'

pull/81/head
Ravi Majithia 2021-09-02 13:56:31 +02:00
parent d0dc718ff6
commit b22d0aab19
1 changed files with 12 additions and 0 deletions

View File

@ -1240,6 +1240,18 @@ H5P.QuestionSet = function (options, contentId, contentData) {
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);