return;
}
}
- var ok = true;
- $(question).find('.answer').each(function () {
- if (($(this).attr('data-correct') == '1') != $(this).hasClass('active')) {
- ok = false;
- return false;
- }
- });
+ if ($(question).attr('data-count') == '0') {
+ ok = null;
+ } else {
+ var ok = true;
+ $(question).find('.answer').each(function () {
+ if (($(this).attr('data-correct') == '1') != $(this).hasClass('active')) {
+ ok = false;
+ return false;
+ }
+ });
+ }
updateScore();
displayBadge(ok);
resizeContainer();
var passed = checkScore();
if (logAttempts) {
- logAttempt(passed);
+ logAttempt(passed);
}
}
- function logAttempt(passed){
+ function logAttempt(passed) {
var logdata = {
passed: passed,
score: Math.round(100 * (score / countQuestions)),
nextScreen();
return;
}
+ if (correct === null) {
+ nextScreen();
+ return;
+ }
if (correct) {
$("#badge").addClass('correct').removeClass('incorrect');
} else {