fix [P-256]: фикс тестов

This commit is contained in:
Denis Voinovich committed 2025-06-04 16:40:17 +03:00
1 parent 8860201d5e
commit 01b5be0e18
2 files changed
+5 -4

No files matched your search

@@ -33,7 +33,7 @@
</span>
</div>
<div class="d-flex align-center mb-3">
<div class="d-flex align-center mb-3" v-if="isExamMode">
<v-icon icon="mdi-refresh" color="teal-darken-2" class="mr-2" />
<span class="text-body-1">
<strong>Количество попыток:</strong> {{ remainingAttempts !== undefined ? remainingAttempts : data?.attemps_number }}
@@ -50,7 +50,7 @@
</v-card-text>
<v-card-actions v-if="!isDialog" class="mx-2 my-4">
<v-btn
v-if="remainingAttempts === undefined || remainingAttempts > 0"
v-if="!isExamMode || remainingAttempts === undefined || remainingAttempts > 0"
color="btn_text"
class="ml-auto px-9 text-white"
@click="startTest"
@@ -147,8 +147,9 @@ export default {
const startTest = async () => {
await getTestById(testId);
// Проверяем, есть ли оставшиеся попытки
if (remainingAttempts.value !== undefined && remainingAttempts.value <= 0) {
// Проверяем попытки только для режима экзамена
const isExamMode = route.query.mode === 'exam';
if (isExamMode && remainingAttempts.value !== undefined && remainingAttempts.value <= 0) {
console.log('Нет оставшихся попыток для прохождения теста');
return; // Прерываем запуск теста если попыток не осталось
}