@extends('student.layouts.app') @section('title', app()->getLocale() === 'ar' ? 'الاختبارات' : 'Exams') @section('content') @php $isArabic = app()->getLocale() === 'ar'; @endphp

{{ $isArabic ? 'الاختبارات' : 'Exams' }}

{{ $isArabic ? 'الاختبارات المتاحة لهذا المقرر' : 'Available exams for this course' }}

@forelse($exams as $exam) @php $attempt = $attempts[$exam->id] ?? null; @endphp

{{ $exam->title }}

@if($exam->description)

{{ $exam->description }}

@endif
@if($exam->duration_minutes) {{ $exam->duration_minutes }} {{ $isArabic ? 'دقيقة' : 'min' }} @endif @if($exam->available_from) {{ $exam->available_from->format('Y-m-d H:i') }} @endif @if($exam->available_until) {{ $exam->available_until->format('Y-m-d H:i') }} @endif
@if($attempt && in_array($attempt->status, ['submitted','auto_graded','graded'])) {{ $isArabic ? 'عرض النتيجة' : 'View Result' }} @elseif($attempt && $attempt->status === 'started') {{ $isArabic ? 'متابعة' : 'Continue' }} @else {{ $isArabic ? 'ابدأ الاختبار' : 'Start Exam' }} @endif
@empty

{{ $isArabic ? 'لا توجد اختبارات متاحة حالياً.' : 'No exams available right now.' }}

@endforelse
@endsection