@extends('layouts.main_dashboard.app') @php $routePrefix = auth()->user()?->usesStaffPortal() ? 'teacher' : 'admin'; $isArabic = app()->getLocale() === 'ar'; $backRoute = $routePrefix === 'teacher' ? route('teacher.courses.my-courses') : route('admin.courses.index'); $courseImage = $course->image ?: asset('assets/media/svg/files/blank-image.svg'); $stageName = $course->subject?->grade?->stage?->name; $gradeName = $course->schoolClass?->grade?->name ?? $course->subject?->grade?->name; $className = $course->schoolClass?->name; $teacherName = $course->teacher?->name ?? __('dashboard.Not assigned yet'); $subjectName = $course->subject?->name ?? __('dashboard.Not assigned yet'); $managementCards = [ [ 'title' => __('dashboard.Materials'), 'count' => $course->materials_count, 'route' => route($routePrefix . '.courses.materials.index', $course->id), 'icon' => 'fa-folder-open', 'hint' => $isArabic ? 'المحتوى والملفات التعليمية' : 'Learning content and files', ], [ 'title' => __('dashboard.Assignments'), 'count' => $course->assignments_count, 'route' => route($routePrefix . '.courses.assignments.index', $course->id), 'icon' => 'fa-list-check', 'hint' => $isArabic ? 'الواجبات والتسليمات' : 'Assignments and submissions', ], [ 'title' => __('dashboard.Quizzes'), 'count' => $course->quizzes_count, 'route' => route($routePrefix . '.courses.quizzes.index', $course->id), 'icon' => 'fa-clipboard-question', 'hint' => $isArabic ? 'الاختبارات والتقييم' : 'Quizzes and assessment', ], [ 'title' => __('dashboard.Virtual Class Rooms'), 'count' => $course->virtual_class_rooms_count, 'route' => route($routePrefix . '.courses.virtual_class_rooms.index', $course->id), 'icon' => 'fa-video', 'hint' => $isArabic ? 'الجلسات المباشرة' : 'Live sessions', ], [ 'title' => __('dashboard.Attendance'), 'count' => $course->attendance_count, 'route' => route($routePrefix . '.courses.attendance.index', $course->id), 'icon' => 'fa-user-check', 'hint' => $isArabic ? 'الحضور والغياب' : 'Attendance tracking', ], ]; if ($routePrefix === 'admin') { $managementCards[] = [ 'title' => __('dashboard.Marks'), 'count' => $course->marks_count, 'route' => route('admin.courses.marks.index', $course->id), 'icon' => 'fa-square-poll-vertical', 'hint' => $isArabic ? 'الدرجات والنتائج' : 'Marks and results', ]; } // Exam V2 — available for both admin and teacher $managementCards[] = [ 'title' => $isArabic ? 'اختبارات V2' : 'Exams V2', 'count' => $course->exams_v2_count ?? \App\Models\ExamV2::where('course_id', $course->id)->count(), 'route' => route('admin.exams-v2.index') . '?course_id=' . $course->id, 'icon' => 'fa-file-pen', 'hint' => $isArabic ? 'الاختبارات المتقدمة' : 'Advanced exams', ]; @endphp @section('title', $isArabic ? 'ملف المساق' : 'Course Profile') @section('page_heading', $isArabic ? 'ملف المساق' : 'Course Profile') @section('page_subtitle', $course->name) @section('skip_page_hero', true) @section('styles') @endsection @section('content')
{{ $isArabic ? 'ملف مرتب للمقرر يضع الأدوات والمحتوى والمتابعة في مساحات أوضح وأسهل استخداماً.' : 'A structured course page that gives tools, content, and tracking clearer space and hierarchy.' }}
{{ $isArabic ? 'المادة' : 'Subject' }}
{{ $subjectName }}
{{ $isArabic ? 'المعلم' : 'Teacher' }}
{{ $teacherName }}
{{ $isArabic ? 'المرحلة / الصف / الفصل' : 'Stage / Grade / Class' }}
{{ $stageName ?? '--' }} / {{ $gradeName ?? '--' }} / {{ $className ?? '--' }}
{{ $isArabic ? 'كل أداة في مساحة مستقلة وواضحة لسرعة الوصول.' : 'Each tool gets its own clearer block for faster access.' }}
{{ $card['hint'] }}
@endforeach{{ $isArabic ? 'تصدير التقارير' : 'Export Reports' }}
{{ $isArabic ? 'قسم مستقل للمحتوى التعليمي داخل المقرر.' : 'A dedicated section for the course learning content.' }}
{{ $item->title }}
{{ $item->created_at?->format('Y-m-d h:i A') ?? $item->due_date?->format('Y-m-d') }}
{{ $isArabic ? 'المنشورات والاستفسارات والمعرض في مساحة مستقلة أوسع.' : 'Posts, inquiries, and gallery in a wider dedicated section.' }}
{{ $post->user?->name ?? ($isArabic ? 'المعلم' : 'Teacher') }}
{{ \Illuminate\Support\Str::limit($post->body, 88) }}
{{ $inquiry->title }}
{{ $inquiry->status === 'replied' ? __('dashboard.Replied') : __('dashboard.New') }}{{ \Illuminate\Support\Str::limit($inquiry->message, 82) }}
{{ $gallery->title }}
{{ $gallery->created_at?->format('Y-m-d') }}
{{ $isArabic ? 'الحصص المباشرة والحضور والدرجات في سكشن مستقل يأخذ مساحته.' : 'Live sessions, attendance, and marks in a standalone section with proper space.' }}
{{ $room->title }}
{{ $room->status }}{{ $room->start_time?->format('Y-m-d h:i A') }}
{{ $attendance->type ?? __('dashboard.Attendance') }}
{{ $attendance->date?->format('Y-m-d') }}{{ $mark->title }}
{{ $mark->date?->format('Y-m-d') }}