@php
$correctKey = $q['correct_option_key'] ?? '';
$correctLabel = $optionLabels[$correctKey] ?? strtoupper((string) $correctKey);
@endphp
{{ $q['number'] }}.
{{ $q['stem'] }}
@if (! empty($q['difficulty']))
{{ $q['difficulty'] }}
@endif
@foreach ($optionLabels as $key => $label)
@php $isCorrect = $key === $correctKey; @endphp
-
{{ $label }}.
{{ $q['options'][$key] ?? '' }}
@if ($isCorrect)
✓ Correct
@endif
@endforeach
@if ($correctLabel !== '' || ! empty($q['explanation']))
@if ($correctLabel !== '')
Correct answer: {{ $correctLabel }}
@endif
@if (! empty($q['explanation']))
{!! nl2br(e($q['explanation'])) !!}
@endif
@endif