From 0d0e287ebade724cc44ba1c10ad0d8170dcb24f1 Mon Sep 17 00:00:00 2001
From: Denis Voinovich
Date: Wed, 28 May 2025 11:52:22 +0300
Subject: [PATCH] =?UTF-8?q?feat=20[P-227]:=20=D0=BC=D0=BD=D0=BE=D0=B6?=
=?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B2=D0=B5=D0=BD=D0=BD=D1=8B=D0=B9=20=D0=B2?=
=?UTF-8?q?=D1=8B=D0=B1=D0=BE=D1=80=20=D0=BD=D0=B0=20=D0=BE=D1=81=D0=BD?=
=?UTF-8?q?=D0=BE=D0=B2=D0=B5=20=D1=87=D0=B8=D1=81=D0=BB=D0=B0=20=D0=B2?=
=?UTF-8?q?=D0=B5=D1=80=D0=BD=D1=8B=D1=85=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82?=
=?UTF-8?q?=D0=BE=D0=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/testing/BodyDetailTesting.vue | 21 ++++++++++++++++---
.../src/components/testing/QuestionBlock.vue | 8 +++----
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src/front/src/components/testing/BodyDetailTesting.vue b/src/front/src/components/testing/BodyDetailTesting.vue
index 90e378b4f..38fd63104 100644
--- a/src/front/src/components/testing/BodyDetailTesting.vue
+++ b/src/front/src/components/testing/BodyDetailTesting.vue
@@ -16,9 +16,13 @@
- Попытка 1 из {{ data?.attemps_number }}
-
- Начать
+ Попытка 1 из {{ data?.attemps_number }}
+
+ {{ isExamMode ? 'Начать' : 'Тренироваться' }}
@@ -28,10 +32,21 @@
diff --git a/src/front/src/components/testing/QuestionBlock.vue b/src/front/src/components/testing/QuestionBlock.vue
index a131cbfef..2682c1168 100644
--- a/src/front/src/components/testing/QuestionBlock.vue
+++ b/src/front/src/components/testing/QuestionBlock.vue
@@ -96,10 +96,10 @@ export default {
answers: Array,
},
setup(props) {
- // Определяем, является ли вопрос с множественным выбором
- const isMultipleChoice = computed(() => props.question.settings?.multiply === 'true');
+ const isMultipleChoice = computed(() => {
+ return props.question.answers.filter(answer => answer.right_wrong).length > 1;
+ });
- // Следим за изменением текущего вопроса и создаем пустой массив, если множественный выбор
watch(
() => props.currentQuestion,
(newVal) => {
@@ -107,7 +107,7 @@ export default {
props.answers[newVal] = [];
}
},
- { immediate: true }, // Устанавливаем сразу при инициализации
+ { immediate: true },
);
return {