diff --git a/resources/views/admin/questions/edit.blade.php b/resources/views/admin/questions/edit.blade.php new file mode 100644 index 0000000..40e3e21 --- /dev/null +++ b/resources/views/admin/questions/edit.blade.php @@ -0,0 +1,128 @@ +@extends('layouts.app') +@section('title', 'Редактировать вопрос') +@section('content') +
+
+ +
+
+

Редактировать вопрос

+ Назад +
+
+ @csrf @method('PUT') + +
+
+
+
+
+ + +
+
+ + +
+
+ + + Отображается после ответа +
+ +
+ +
+ @foreach($question->answers as $answer) +
+ + + + +
+ @endforeach +
+ +
+ + +
+
+
+
+
+
+
Настройки
+
+ + +
+
+ + +
+
+ is_required) ? 'checked' : '' }}> + +
+
+
+
+
+ + Отмена +
+
+
+
+ +@endsection diff --git a/resources/views/admin/questions/show.blade.php b/resources/views/admin/questions/show.blade.php new file mode 100644 index 0000000..e6d0c85 --- /dev/null +++ b/resources/views/admin/questions/show.blade.php @@ -0,0 +1,70 @@ +@extends('layouts.app') +@section('title', $question->question_text) +@section('content') +
+
+ +
+
+

Вопрос #{{ $question->id }}

+
+ Редактировать + Назад +
+
+ +
+
+
+
Информация
+
+ + + + + + + +
Тип:{{ $question->type }}
Вопрос:{{ $question->question_text }}
Пояснение:{{ $question->explanation ?? '—' }}
Баллы:{{ $question->score }}
Порядок:{{ $question->sort_order }}
Обязательный:@if($question->is_required)Да@elseНет@endif
+
+
+
+
+
+ @if($question->type === 'matching') +
Пары
+
+ @if($question->matchingPairs->count() > 0) +
    + @foreach($question->matchingPairs as $pair) +
  • {{ $pair->left_text }}{{ $pair->right_text }} ({{ $pair->match_score }} балл.)
  • + @endforeach +
+ @else +

Нет пар

+ @endif +
+ @else +
Ответы
+
+ @if($question->answers->count() > 0) +
    + @foreach($question->answers as $answer) +
  • + {{ Str::limit($answer->answer_text, 50) }} + @if($answer->is_correct)@endif +
  • + @endforeach +
+ @else +

Нет ответов

+ @endif +
+ @endif +
+
+
+
+
+
+@endsection