@extends('admin.layout.app') @section('title', 'Add Exam Result') @section('body')

Add Exam Result

Choose faculty, department, subject, and exam type before entering marks.

Back to List
@if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
Please correct the highlighted fields.
{{ $errors->first() }}
@endif
@if($course && $selectedExamType)
@csrf

{{ $course->title }}

{{ $course->code ? $course->code.' / ' : '' }} {{ $course->semester?->program?->department?->faculty?->name ?? '-' }} / {{ $course->semester?->program?->department?->name ?? '-' }} / {{ $course->semester?->name ?? '-' }}
{{ $selectedExamType->name }} Weight: {{ rtrim(rtrim(number_format((float) $selectedExamType->weight, 2), '0'), '.') }}%
{{ $students->count() }} enrolled students
@forelse($students as $index => $enrollment) @php $student = $enrollment->student; $existing = $existingMarks->get($enrollment->student_user_id); $existingResult = $existingResults->get($enrollment->student_user_id); @endphp @empty @endforelse
# Student Contact {{ $selectedExamType->name }} Marks Current Total
{{ $index + 1 }}
{{ $student?->name ?? '-' }}
{{ $student?->studentRecord?->student_no ?? 'Student ID not set' }}
{{ $student?->email ?? '-' }}
{{ $student?->phone ?? '-' }}
{{ $existingResult ? number_format((float) $existingResult->total_marks, 2).'%' : '-' }}
No active students are enrolled in this subject.
Cancel
@elseif($course)
Select an exam type to display the mark sheet for this subject.
@else
Select a subject to display the enrolled students.
@endif @endsection