From e510b662ed450a5fc3948b85502b943117692e29 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 7 Oct 2016 13:38:39 +0200 Subject: [PATCH] Restore at last page if in solution mode HFP-9 --- js/questionset.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/questionset.js b/js/questionset.js index 1e18f63..cd9727a 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -881,17 +881,15 @@ H5P.QuestionSet = function (options, contentId, contentData) { /** * Returns the complete state of question set and sub-content * - * @returns {Object} + * @returns {Object} current state */ this.getCurrentState = function () { - var state = { - progress: currentQuestion, + return { + progress: showingSolutions ? questionInstances.length - 1 : currentQuestion, answers: questionInstances.map(function (qi) { return qi.getCurrentState(); }) }; - - return state; }; };