@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())
| # |
Student |
Admission No |
Score |
Max |
Average % |
Attendance |
@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
| {{ $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'] }}%) |
@endforeach
@else
No students found in this class.
@endif
@else
Select a class above to view the report.
@endif
@endsection