diff --git a/src/front/src/components/testing/DetailCardTest.vue b/src/front/src/components/testing/DetailCardTest.vue index 9d879ed0a..153d88214 100644 --- a/src/front/src/components/testing/DetailCardTest.vue +++ b/src/front/src/components/testing/DetailCardTest.vue @@ -34,6 +34,9 @@ :answeredQuestions="answeredQuestions" :totalQuestions="data.question_count" :formattedTime="formattedTime" + :questions="data?.questions" + :userAnswers="answers" + @restart="startTest" /> @@ -138,11 +141,19 @@ export default { const startTest = async () => { await deactivateOldTestings(testId); + await getTestById(testId); + testStarted.value = true; testFinished.value = false; + + answers.value = Array(data.value.questions.length).fill(null); data.value = { ...data.value, time: data.value.time * 60 }; + if (timer) { + clearInterval(timer); + } + timer = setInterval(() => { if (data.value?.time > 0) { data.value = { ...data.value, time: data.value.time - 1 }; diff --git a/src/front/src/components/testing/TestResults.vue b/src/front/src/components/testing/TestResults.vue index f35d593fd..417815185 100644 --- a/src/front/src/components/testing/TestResults.vue +++ b/src/front/src/components/testing/TestResults.vue @@ -14,17 +14,35 @@ mdi-close-circle
Не расстраивайтесь!
Попробуйте еще раз
+ + Пройти заново + mdi-reload + - + mdi-checkbox-marked-circle

{{ correctAnswers }}/{{ totalQuestions }}

-
Правильных ответов
+
+ Правильных ответов + mdi-information +
@@ -44,11 +62,63 @@
+ + + + + + Правильные ответы + + + + + + + +
+ + {{ isQuestionCorrect(index) ? 'mdi-check-circle' : 'mdi-close-circle' }} + + Вопрос {{ index + 1 }} +
+
+ +

{{ question.name }}

+ +
+ + {{ answer.right_wrong ? 'mdi-check' : 'mdi-minus' }} + + + {{ answer.name }} + + (правильный ответ) +
+
+
+
+
+
+
@@ -88,6 +193,10 @@ export default { transform: translateY(-5px); } +.cursor-pointer { + cursor: pointer; +} + .success-light { background-color: #E8F5E9 !important; }