From 7bcd2472bac436ef96f65441cf3604cafa13f209 Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Mon, 27 Jun 2016 15:42:31 +0200 Subject: [PATCH] Read feedback when changing question. Do not read feedback when showing all solutions. HFJ-2043 --- js/questionset.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/questionset.js b/js/questionset.js index 6f3ceb0..079876c 100644 --- a/js/questionset.js +++ b/js/questionset.js @@ -236,6 +236,10 @@ H5P.QuestionSet = function (options, contentId) { .show() .html(humanizedProgress) .focus(); + + if (instance && instance.readFeedback) { + instance.readFeedback(); + } }, 0); // Remember where we are @@ -252,7 +256,10 @@ H5P.QuestionSet = function (options, contentId) { var showSolutions = function () { for (var i = 0; i < questionInstances.length; i++) { try { + // Do not read answers + questionInstances[i].toggleReadSpeaker(true); questionInstances[i].showSolutions(); + questionInstances[i].toggleReadSpeaker(false); } catch(error) { H5P.error("subcontent does not contain a valid showSolutions function");