@extends('layouts.teacher') @section('title', $quiz->title) @section('header', $quiz->title) @section('content')
{{-- Header --}}

{{ $quiz->title }}

Kembali
{{-- Quiz Stats --}}

{{ $quiz->questions->count() }}

{{ $quiz->duration_minutes ?: '∞' }}

{{ $quiz->duration_minutes ? 'menit' : '' }}

{{ $quiz->max_attempts }}

kali

{{ $quiz->passing_score }}

poin

{{-- Form Tambah Soal --}}

Tambah Soal

@csrf @if($errors->any())
    @foreach($errors->all() as $err)
  • {{ $err }}
  • @endforeach
@endif {{-- Pertanyaan --}}
@error('question')

{{ $message }}

@enderror
{{-- Poin & Urutan --}}
@error('points')

{{ $message }}

@enderror
{{-- Pilihan A-D --}}

Pilihan Jawaban

@foreach(range(0, 3) as $index)
{{ chr(65 + $index) }}
@endforeach
@error('answers')

{{ $message }}

@enderror
{{-- Jawaban Benar --}}
@error('correct_answer')

{{ $message }}

@enderror
{{-- Daftar Soal --}}

Daftar Soal ({{ $quiz->questions->count() }})

@if($quiz->questions->isEmpty())

Belum ada soal.

@else
@foreach($quiz->questions as $i => $question)
{{ $i + 1 }}

{{ $question->question }}

{{ $question->points }} poin @if(isset($question->id))
@csrf @method('DELETE')
@endif
@foreach($question->answers as $answer)
{{ $answer->is_correct ? '✓' : '' }}
{{ $answer->answer_text }}
@endforeach
@endforeach
@endif
@endsection