@php $serial = $serialStart ?? 1; $allocatedSet = array_map('strval', $allocatedQuestionIds ?? []); @endphp @forelse($questions as $q) @php $qid = (string) $q->id; $isAllocated = in_array($qid, $allocatedSet, true); $levelRaw = strtolower(trim((string) ($q->level ?? 'easy'))); $levelClass = $levelRaw === 'hard' ? 'sr-level-hard' : ($levelRaw === 'medium' ? 'sr-level-medium' : 'sr-level-easy'); @endphp
#{{ $serial }} {{ ucfirst($levelRaw ?: 'Easy') }}

{{ $serial }}. {{ $q->title }}

Coding Problem {{ $isAllocated ? 'Selected' : 'Click to select' }}
@php $serial++; @endphp @empty

No Coding Questions Available

No coding problems were found for this course and module yet.

@endforelse