@php $levelRaw = strtolower(trim((string) ($mcq->level ?? 'easy'))); $levelClass = $levelRaw === 'hard' ? 'sr-level-hard' : ($levelRaw === 'medium' ? 'sr-level-medium' : 'sr-level-easy'); $allowedTags = '


    1. '; $options = [ 'A' => $mcq->option1 ?? '', 'B' => $mcq->option2 ?? '', 'C' => $mcq->option3 ?? '', 'D' => $mcq->option4 ?? '', ]; @endphp
      Question #{{ $mcq->id }} {{ ucfirst($levelRaw ?: 'Easy') }}
      {!! strip_tags(htmlspecialchars_decode((string) $mcq->question), $allowedTags) !!}
      @foreach($options as $letter => $optVal) @php $isCorrect = trim((string) ($mcq->answer ?? '')) === trim((string) $optVal); @endphp
      {{ $letter }}
      {!! strip_tags(htmlspecialchars_decode((string) $optVal), $allowedTags) !!}
      @if($isCorrect) Correct @endif
      @endforeach