Making dot-status to answered only when getAnswerGiven() returns true

pull/5/head
Paal Joergensen 2016-05-30 15:04:24 +02:00
parent 5d5c431c1e
commit 5431b4b06a
1 changed files with 6 additions and 1 deletions

View File

@ -267,6 +267,9 @@ H5P.QuestionSet = function (options, contentId) {
// Hide finish button
questionInstances[questionInstances.length - 1].hideButton('finish');
// Mark all tasks as unanswered:
$('.progress-dot').removeClass('answered').addClass('unanswered');
//Force the last page to be reRendered
rendered = false;
};
@ -501,7 +504,9 @@ H5P.QuestionSet = function (options, contentId) {
if (shortVerb === 'interacted' ||
shortVerb === 'answered' ||
shortVerb === 'attempted') {
$('.progress-dot:eq(' + currentQuestion +')', $myDom).removeClass('unanswered').addClass('answered');
if (questionInstances[currentQuestion].getAnswerGiven()) {
$('.progress-dot:eq(' + currentQuestion +')', $myDom).removeClass('unanswered').addClass('answered');
}
_updateButtons();
}
if (shortVerb === 'completed') {