diff --git a/resources/views/admin/questions/index.blade.php b/resources/views/admin/questions/index.blade.php index e56200f..f5fff8b 100644 --- a/resources/views/admin/questions/index.blade.php +++ b/resources/views/admin/questions/index.blade.php @@ -19,11 +19,20 @@
- {{ $question->type }} - #{{ $loop->iteration }}. {{ Str::limit($question->question_text, 100) }} + #{{ $loop->iteration }} + @if($question->type === 'single_choice') + + @elseif($question->type === 'multiple_choice') + + @elseif($question->type === 'input') + + @elseif($question->type === 'matching') + + @endif + {{ Str::limit($question->question_text, 100) }}
- {{ $question->answers->count() }} ответов - @if($question->is_required)Обязательный@endif + {{ $question->answers->count() }} ответов@if($question->matchingPairs->count() > 0), {{ $question->matchingPairs->count() }} пар@endif + @if($question->is_required) Обязательный@endif {{ $question->score }} балл(а)
diff --git a/resources/views/admin/tests/show.blade.php b/resources/views/admin/tests/show.blade.php index e2eeb2b..a6f0b2c 100644 --- a/resources/views/admin/tests/show.blade.php +++ b/resources/views/admin/tests/show.blade.php @@ -32,27 +32,64 @@
-
+
-
Вопросы
+
Вопросы ({{ $test->questions->count() }})
@if($test->questions->count() > 0) - +
+ + + + + + + + + + + + + @foreach($test->questions as $question) + + + + + + + + + @endforeach + +
#ВопросТипБаллыОтветовДействия
{{ $loop->iteration }} + + {{ Str::limit($question->question_text, 80) }} + + @if($question->is_required)@endif + + @if($question->type === 'single_choice') + + @elseif($question->type === 'multiple_choice') + + @elseif($question->type === 'input') + + @elseif($question->type === 'matching') + + @endif + {{ $question->type }} + {{ $question->score }}{{ $question->answers->count() }}@if($question->matchingPairs->count() > 0) + {{ $question->matchingPairs->count() }} пар@endif +
+ +
+ @csrf @method('DELETE') + +
+
+
+
@else

Нет вопросов

@endif diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index aba843c..436dc10 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -48,6 +48,11 @@ .card-stat { border-left: 4px solid var(--primary-color); } + + .badge-purple { + background-color: #6f42c1; + color: white; + } @stack('styles')