{{-- Main content --}}
{{-- Header soal --}}
Soal No. {{ $current + 1 }} Pilihan Ganda
{{-- Soal --}}
{!! $soal[$current]->soal !!}
{{-- Pilihan jawaban --}}
@php $opsiList = []; foreach (['a', 'b', 'c', 'd', 'e'] as $opsi) { $isi = trim($soal[$current]->{'opsi_' . $opsi} ?? ''); if ($isi !== '') { $opsiList[$opsi] = $isi; } } $jawabanSaatIni = $jawaban[$current] ?? null; @endphp @foreach ($opsiList as $opsi => $teksOpsi) @endforeach
@if ($current < count($soal) - 1) @else @endif
{{-- Sidebar navigasi soal --}}

Navigasi Soal

Klik nomor untuk pindah soal

{{-- Progress Navigasi --}} @php $percent = $this->progress['percent']; $barColor = $percent < 40 ? 'bg-red-500' : ($percent < 70 ? 'bg-yellow-500' : 'bg-green-600'); $textColor = $percent < 40 ? 'text-red-600' : ($percent < 70 ? 'text-yellow-600' : 'text-green-700'); @endphp
Progress Pengerjaan {{ $this->progress['answered'] }}/{{ $this->progress['total'] }}

{{ $percent }}% selesai

{{-- PERBAIKAN DI SINI: --}} {{-- Tambahkan 'content-start' agar tombol tidak menyebar ke bawah --}} {{-- Saya kembalikan ke gap-2 agar jarak antar tombol tidak terlalu sempit, tapi Anda bisa ubah ke gap-1 jika mau --}}
@foreach ($soal as $i => $s) @php // cek apakah index ini sudah dijawab $sudahJawab = array_key_exists($i, $jawaban) && !is_null($jawaban[$i]); @endphp @endforeach
{{-- HIDDEN INPUT UNTUK SCRIPT --}} {{-- Protection Script, dipasang Paling Akhir --}} {{-- --}}