{{-- 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