@if(empty($topics) || count($topics) === 0)

No Topics Found

There are no topics available for this module.

@else @php // Color palette $topicColors = [ '#3b82f6', '#10b981', '#ef4444', '#f59e0b', '#8b5cf6', '#ec4899', '#14b8a6', '#f97316' ]; $staff = session('staff_data'); $batch = session('batch_id'); // Get previously covered topics for this module $previouslyCoveredTopics = []; foreach($topics as $topic) { if ($topic->previously_covered) { $previouslyCoveredTopics[] = $topic->id; } } @endphp
@csrf
@foreach($topics as $index => $topic) @php $color = $topicColors[$index % count($topicColors)]; $wasCovered = $topic->previously_covered ?? false; $isChecked = $topic->is_checked ?? false; @endphp

{{ $index + 1 }}. {{ $topic->topic }} @if($wasCovered && !$isChecked) Will be uncovered @elseif($wasCovered && $isChecked) Previously covered @endif

Coding: {{ $topic->coding_count ?? 0 }} MCQ: {{ $topic->mcq_count ?? 0 }}
@endforeach
@endif