@extends('layouts.app') @section('title', 'My Exams') @section('content')
Available Exams
@forelse($exams as $exam)
{{ $exam->title }}
{{ $exam->subject->name }} {{ $exam->duration_minutes }} mins {{ $exam->total_questions }} questions Pass: {{ $exam->pass_mark }}%
{{ $exam->start_date ? date('M d, Y H:i', strtotime($exam->start_date)) : 'N/A' }} - {{ $exam->end_date ? date('M d, Y H:i', strtotime($exam->end_date)) : 'N/A' }}
@if($exam->isAvailable()) Start Exam @elseif($exam->start_date > now()) Upcoming @else Closed @endif
@if($exam->instructions)
{{ $exam->instructions }}
@endif
@empty

No exams available at the moment.

@endforelse
My Attempts
@forelse($attempts as $attempt)
{{ $attempt->exam->title ?? 'N/A' }}
{{ $attempt->exam->subject->name ?? '' }}
@if($attempt->status === 'graded') {{ number_format($attempt->percentage, 1) }}% View @elseif($attempt->status === 'in_progress') In Progress Continue @else {{ ucfirst($attempt->status) }} @endif
@empty
No attempts yet
@endforelse
@endsection