@extends('layouts.school') @section('title', 'Class Report') @section('header', 'Class Report') @section('content')
@if($classInfo)

{{ $classInfo->name }}

@if($examInfo) {{ $examInfo->name }} @endif {{ $students->count() }} students
@if($students->count())
@foreach($students as $i => $row) @php $color = $row['percentage'] >= 70 ? 'text-green-600' : ($row['percentage'] >= 50 ? 'text-amber-600' : 'text-red-600'); $attColor = $row['attendance_pct'] >= 80 ? 'text-green-600' : ($row['attendance_pct'] >= 60 ? 'text-amber-600' : 'text-red-600'); @endphp @endforeach
# Student Admission No Score Max Average % Attendance
{{ $i + 1 }} {{ $row['student']->full_name }} {{ $row['student']->admission_no }} {{ $row['total_obtained'] }} {{ $row['total_max'] }} {{ $row['percentage'] }}% {{ $row['present_days'] }}/{{ $row['total_days'] }} ({{ $row['attendance_pct'] }}%)
@else
No students found in this class.
@endif @else
Select a class above to view the report.
@endif @endsection