@extends('layouts.main_dashboard.app') @php $isArabic = app()->getLocale() === 'ar'; $marksCollection = collect($marks); @endphp @section('title', __('dashboard.All Marks')) @section('page_heading', __('dashboard.All Marks')) @section('page_subtitle', $course->name) @section('skip_page_hero', true) @section('content')
{{ $isArabic ? 'الدرجات' : 'Marks' }} {{ $course->name }}

{{ $isArabic ? 'جميع سجلات الدرجات' : 'All Marks' }}

{{ $isArabic ? 'عرض أوضح لكل سجلات التقييم داخل المقرر، مع الدرجة الكلية، حالة النشر، وعدد الطلاب المشمولين بكل سجل.' : 'A clearer list of all grading records in the course with total score, publication status, and student coverage per record.' }}

@if($marksCollection->isEmpty())

{{ __('dashboard.No data found') }}

{{ __('dashboard.There are no mark records to display, try creating one!') }}

{{ __('dashboard.Add New Mark') }}
@else
@foreach($marksCollection as $mark)

{{ $mark->title ?: ($isArabic ? 'سجل درجات' : 'Mark Record') }}

{{ $mark->score }} {{ $isArabic ? 'درجة كلية' : 'total points' }} {{ $mark->is_published ? __('dashboard.Published') : __('dashboard.Unpublished') }}

{{ \Illuminate\Support\Str::limit((string) $mark->description, 150) }}

{{ __('dashboard.Date') }}: {{ $mark->date?->format('Y-m-d') ?? 'N/A' }}
{{ __('dashboard.Total Score') }}: {{ $mark->score }}
{{ $isArabic ? 'الطلاب:' : 'Students:' }} {{ $mark->students_count ?? 0 }}
@endforeach
@endif
@endsection