Файл: Тесты бастау бизнес. Спасибо всем кто участвовал в проекте, но я вылажил эти ответы!.docx

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 03.02.2024

Просмотров: 1501

Скачиваний: 75

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.


console.log(_load());

console.log(stats());

return false;

}
//NOTE: Ответ имееться, пропускаем данный пункт

if (json[x].correctAnswer == -1) {

if (q[index].attributes.class.value == "success") {

if (json[x].correctAnswer == -1) {

console.warn("Ответ взломан на Вопрос:" + json[x].question + " правильно будет = " + json[x].answers[json[x].fakeAnswerSelected] + "попыток на взлом: " + json[x].incorrectAnswers.length);

json[x].correctAnswer = json[x].fakeAnswerSelected; // set corrected answer

}

}

else {

json[x].incorrectAnswers.push(json[x].fakeAnswerSelected); // add incorrected answer (fake)
//Remained 1 answer and this correct answer!

if (json[x].answers.length - 1 == json[x].incorrectAnswers.length) {

//json[x].incorrectAnswers= []; // clear

for (let y = 0; y < json[x].answers.length; ++y) {

let _find = json[x].incorrectAnswers.indexOf(y);

//this is corrected answer

if (_find == -1) {

json[x].correctAnswer = y;

break;

}

}
}

}

//remove mark

json[x].fakeAnswerSelected = -1;

}

else {

console.warn("Ответ для вопроса: (" + json[x].questionIndex + ") " + json[x].question + " - пропущен = корректный");

}
}

_save(json);

console.log(stats());

return true;

}