@extends('adminlte::page') @section('title', 'Student Results') @section('content_header')

Student Result Summary

@stop @section('content')
{{-- Flash Messages --}} @if (session('warning'))
{{ session('warning') }}
@elseif (session('error'))
{{ session('error') }}
@endif {{-- Student Info Card --}}
Student Photo

{{ $student->name }}

Admission No: {{ $student->admission_no ?? 'N/A' }}

Class: {{ $student->class->name ?? 'N/A' }}

Exam: {{ $exam->name ?? 'All Exams' }}

Department: {{ $departments->firstWhere('id', $selected_department_id)->name ?? 'All Departments' }}

{{-- Filters --}}
{{-- Back to Dashboard --}}
Back to Dashboard
{{-- Subject Results Table --}}
Subject Results
@if($selected_department_id) Department: {{ $departments->firstWhere('id', $selected_department_id)->name ?? 'N/A' }} @endif
+ + @forelse ($subjectsData as $subject) @php $badgeClass = match($subject['grade'] ?? '-') { 'A' => 'bg-success', 'B' => 'bg-primary', 'C' => 'bg-warning text-dark', 'D' => 'bg-orange text-dark', 'E', 'F' => 'bg-danger', default => 'bg-secondary' }; @endphp @empty @endforelse @if($totalPoints > 0) @endif
# Subject Mark Grade Point Remark Position
{{ $loop->iteration }} {{ $subject['subject'] }} {{ number_format($subject['mark'], 2) }} {{ $subject['grade'] ?? '-' }} {{ $subject['point'] }} {{ $subject['remark'] }} {{ $subject['subject_position'] ?? '-' }}
No results found for this exam or department.
Total Points (Best 7): {{ $totalPoints }}
{{-- Summary Cards --}}
GPA

{{ number_format($result['gpa'], 2) }}

Division

{{ $result['division'] }}

Class Position

{{ $rank }}

{{-- Charts (if any data) --}} @if(!empty($subjectTrend) || !empty($bestSubjectsOverall))
@if(!empty($subjectTrend))
Subject Trend
@endif @if(!empty($bestSubjectsOverall))
Best Subjects Overall
@endif
@endif
@stop @push('js') @endpush