@extends('layouts.app') @section('content')
{{-- Header + Quick action --}}

{{ __('app.dashboard.title') }}

{{-- Active Exams --}} @if(isset($activeExams) && $activeExams->count())
{{ __('app.student.exams.active_title') }} {{ __('app.student.exams.active_hint') }}
@foreach($activeExams as $exam) @php $att = ($examAttempts ?? collect())->get($exam->id); @endphp @endforeach
{{ __('app.student.exams.table.title') }} {{ __('app.student.exams.table.subject') }} {{ __('app.student.exams.table.grade') }} {{ __('app.student.exams.table.lang') }} {{ __('app.student.exams.table.date') }} #Q {{ __('app.student.exams.table.action') }}
{{ $exam->title }} {{ $exam->subject?->name ?? '—' }} {{ $exam->grade ?? '—' }} {{ strtoupper($exam->question_language) }} {{ $exam->exam_date?->format('Y-m-d') ?? '—' }} {{ $exam->num_questions }} @if($att) @if($att->finished_at) {{ __('app.student.exams.submitted_status') }} @else {{ __('app.student.exams.resume') }} @endif @else
@csrf
@endif
@else
{{ __('app.dashboard.no_active_exams') }}
@endif {{-- Practice Attempts --}}
{{ __('app.student.practice.title') }}
@if(isset($attempts) && $attempts->count())
@foreach($attempts as $a) @endforeach
{{ __('app.student.practice.table.started') }} {{ __('app.student.practice.table.subject') }} {{ __('app.student.practice.table.progress') }} {{ __('app.student.practice.table.status') }} {{ __('app.student.practice.table.action') }}
{{ $a->started_at?->format('Y-m-d H:i') ?? $a->created_at->format('Y-m-d H:i') }} {{ $a->subject?->name ?? '—' }} {{ (int)($a->total_items ?? 0) }} / {{ (int)$a->max_items }} @if($a->finished_at) {{ __('app.student.practice.finished') }} @else {{ __('app.student.practice.in_progress') }} @endif @if($a->finished_at) {{ __('app.student.practice.view_result') }} @else {{ __('app.student.practice.resume') }} @endif
@if(method_exists($attempts, 'links'))
{{ $attempts->onEachSide(1)->links() }}
@endif @else
{{ __('app.student.practice.empty') }}
@endif
{{-- Start Practice Modal --}} @endsection