Restore at last page if in solution mode

HFP-9
pull/7/head
thomasmars 2016-10-07 13:38:39 +02:00
parent f7c772b212
commit e510b662ed
1 changed files with 3 additions and 5 deletions

View File

@ -881,17 +881,15 @@ H5P.QuestionSet = function (options, contentId, contentData) {
/** /**
* Returns the complete state of question set and sub-content * Returns the complete state of question set and sub-content
* *
* @returns {Object} * @returns {Object} current state
*/ */
this.getCurrentState = function () { this.getCurrentState = function () {
var state = { return {
progress: currentQuestion, progress: showingSolutions ? questionInstances.length - 1 : currentQuestion,
answers: questionInstances.map(function (qi) { answers: questionInstances.map(function (qi) {
return qi.getCurrentState(); return qi.getCurrentState();
}) })
}; };
return state;
}; };
}; };