@extends('layouts.main_dashboard.app') @php $isAr = app()->getLocale() === 'ar'; @endphp @section('title', $evaluation->title) @section('content')

{{ $evaluation->title }}

{{ $evaluation->grade->stage->name ?? '-' }} {{ $evaluation->grade->name ?? '-' }}

{{ $isAr ? 'الخطوة 1: تصدير القالب' : 'Step 1: Export Template' }}

{{ $isAr ? "قم بتحميل ملف Excel الموحد للصف: " : "Download the standardized Excel sheet for: " }} {{ $evaluation->grade->name }}. {{ $isAr ? "يرجى عدم تعديل عناوين الأعمدة." : "Please do not alter the header columns." }}

{{ $isAr ? 'تحميل قالب Excel' : 'Download Excel Template' }}

{{ $isAr ? 'الخطوة 2: استيراد الدرجات' : 'Step 2: Import Marks' }}

{{ $isAr ? 'قم برفع ملف Excel المكتمل لتحديث الدرجات تلقائياً. سيتم استبدال الدرجات الموجودة.' : 'Upload the filled Excel file to update marks automatically. Existing marks will be overwritten.' }}

@csrf

{{ $isAr ? 'الطلاب والدرجات' : 'Students & Marks' }}

{{ $isAr ? 'إجمالي الطلاب:' : 'Total Students:' }} {{ $students->count() }}

@foreach($subjects as $sub) @endforeach @forelse($students as $student) @php $class = $student->schoolClass->first(); @endphp @foreach($subjects as $sub) @php $markRecord = $student->finalEvaluationMarks->where('subject_id', $sub->id)->first(); $markValue = $markRecord ? $markRecord->mark : null; $isFailing = is_numeric($markValue) && $markValue < ($sub->total_marks * 0.5); @endphp @endforeach @empty @endforelse
{{ $isAr ? 'اسم الطالب' : 'Student Name' }} {{ $isAr ? 'الفصل' : 'Class' }}
{{ $sub->name }} MAX: {{ $sub->total_marks }}
{{ $isAr ? 'الإجراءات' : 'Actions' }}
{{ substr($student->first_name, 0, 1) }}

{{ $student->first_name }} {{ $student->last_name }}

{{ $student->registration_number }}

{{ $class->name ?? 'N/A' }} @if(is_numeric($markValue))
{{ $markValue }}
@else - @endif

{{ $isAr ? 'لا يوجد طلاب مسجلين لهذا الصف.' : 'No students found for this grade.' }}

@endsection @section('scripts') @endsection