Making dot-status to answered only when getAnswerGiven() returns true
parent
5d5c431c1e
commit
5431b4b06a
|
@ -267,6 +267,9 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
// Hide finish button
|
// Hide finish button
|
||||||
questionInstances[questionInstances.length - 1].hideButton('finish');
|
questionInstances[questionInstances.length - 1].hideButton('finish');
|
||||||
|
|
||||||
|
// Mark all tasks as unanswered:
|
||||||
|
$('.progress-dot').removeClass('answered').addClass('unanswered');
|
||||||
|
|
||||||
//Force the last page to be reRendered
|
//Force the last page to be reRendered
|
||||||
rendered = false;
|
rendered = false;
|
||||||
};
|
};
|
||||||
|
@ -501,7 +504,9 @@ H5P.QuestionSet = function (options, contentId) {
|
||||||
if (shortVerb === 'interacted' ||
|
if (shortVerb === 'interacted' ||
|
||||||
shortVerb === 'answered' ||
|
shortVerb === 'answered' ||
|
||||||
shortVerb === 'attempted') {
|
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();
|
_updateButtons();
|
||||||
}
|
}
|
||||||
if (shortVerb === 'completed') {
|
if (shortVerb === 'completed') {
|
||||||
|
|
Loading…
Reference in New Issue