@if(count($reportData) > 0) @foreach($reportData as $index => $data) @php $percentage = $data['percentage']; $progressLevel = $data['progress_level']; $status = $data['completed'] == 0 ? 'not-attempted' : ($data['completed'] < $data['total'] ? 'partial' : 'completed'); $rank = $data['rank']; $showRankBadge = $rank <= 3 && $data['completed'] > 0; $rankColors = [ 1 => ['bg' => '#fbbf24', 'text' => '#92400e', 'icon' => 'fas fa-trophy', 'label' => '1st'], 2 => ['bg' => '#d1d5db', 'text' => '#374151', 'icon' => 'fas fa-medal', 'label' => '2nd'], 3 => ['bg' => '#b45309', 'text' => '#fef3c7', 'icon' => 'fas fa-award', 'label' => '3rd'] ]; @endphp
{{ substr($data['student']->name, 0, 1) }}

{{ $data['student']->name }} @if($showRankBadge) {{ $rankColors[$rank]['label'] }} @endif

{{ $data['student']->regno }} @if($data['completed'] > 0) Rank: {{ $rank }} @endif
Completed {{ $data['completed'] }}/{{ $data['total'] }}
Progress {{ $percentage }}%
@if($data['completed'] > 0)
@csrf
@else @endif
@endforeach @else

No Data Available

{{ isset($search) && $search ? 'No students match your search criteria.' : 'No student data found for this topic.' }}

@endif