@php $school = \App\Models\Setting::school(); $termRecord = \App\Models\AcademicTerm::where('term', $term ?? current_term())->where('year', $year ?? current_year())->first(); $present = ($attendance['Present'] ?? 0) + ($attendance['present'] ?? 0); $attendanceTotal = collect($attendance ?? [])->sum(); $attendanceRate = $attendanceTotal > 0 ? round($present / $attendanceTotal * 100) : null; $remarks = ['A' => 'Excellent', 'A-' => 'Very good', 'B+' => 'Very good', 'B' => 'Good', 'B-' => 'Good', 'C+' => 'Fair', 'C' => 'Fair', 'C-' => 'Average', 'D+' => 'Below average', 'D' => 'Below average', 'D-' => 'Weak', 'E' => 'Very weak']; @endphp
| Student | {{ $student->full_name }} | Admission no | {{ $student->admission_no }} | Class | {{ $student->class_label }} |
| Term | Term {{ $term ?? current_term() }}, {{ $year ?? current_year() }} | Exam | {{ $exam->name ?? '—' }} | Stream | {{ $student->stream ?: '—' }} |
| Term dates | {{ $termRecord && $termRecord->start_date ? \Carbon\Carbon::parse($termRecord->start_date)->format('d M Y') : '—' }} — {{ $termRecord && $termRecord->end_date ? \Carbon\Carbon::parse($termRecord->end_date)->format('d M Y') : '—' }} | Attendance | {{ $attendanceRate !== null ? $attendanceRate.'%' : '—' }} | Class teacher | {{ $classTeacher->full_name ?? '—' }} |
| # | Subject | Score | Grade | Points | Remarks |
|---|---|---|---|---|---|
| {{ $i + 1 }} | {{ $subject->name }} | {{ $m ? number_format($m['score'], 1) : '—' }} | {{ $m['grade'] ?? '—' }} | {{ $m['points'] ?? '—' }} | {{ $m ? ($remarks[$m['grade']] ?? '') : 'Not examined' }} |
| No marks recorded for this exam. | |||||
Total marks {{ $row ? number_format($row['total'], 1) : '—' }} |
Average {{ $row ? number_format($row['average'], 1).'%' : '—' }} |
Mean grade {{ $row['mean_grade'] ?? '—' }} |
Total points {{ $row['points'] ?? '—' }} |
Stream position {{ $row['stream_position'] ?? '—' }} |
Overall position {{ $row['overall_position'] ?? '—' }} |
| Class teacher: {{ $classTeacher->full_name ?? '________________' }} | Principal: {{ \App\Models\Setting::get('principal_name', '________________') }} | Parent / guardian: ________________ |