@forelse ($questions as $index => $question)
{{-- Row: Nomor + Teks Soal + Aksi --}}
{{-- Checkbox --}} @if (!isset($mode) || $mode !== 'show')
@endif {{-- Badge Nomor --}} Q{{ $index + 1 }} {{-- Teks Soal --}}

{{ $question->question_text }}

{{-- Action Buttons --}} @if (!isset($mode) || $mode !== 'show')
@endif
{{-- Gambar Soal --}} @if ($question->question_image)
@endif {{-- Pilihan Jawaban (MC) --}} @if ($question->question_type == 'mc')
@php $abc = ['A', 'B', 'C', 'D']; @endphp @foreach ($question->options as $oIndex => $option)
{{ $abc[$oIndex] }}.
@if ($option->option_image) @endif {{ $option->answer_detail }}
@if ($option->is_correct) Benar @endif
@endforeach
@else
Essay
@endif {{-- Footer: Poin & Kunci Jawaban --}}
{{ $question->point_weight }} Poin @if ($question->question_type == 'mc') @php $correct = $question->options->where('is_correct', 1)->first(); @endphp @if ($correct) Kunci: {{ $abc[$question->options->search($correct)] ?? '' }} @endif @endif
@empty

Belum ada soal di bank ini

Klik tombol Tambah Soal untuk mulai mengisi bank soal

@endforelse