← Exams
@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif

Exam info

{{ $exam->course?->title }}

{{ $exam->questions->count() }} questions · Pass {{ $exam->pass_score }}% @if ($exam->duration_minutes) · {{ $exam->duration_minutes }} min @endif

@if ($exam->starts_at || $exam->ends_at) {{ optional($exam->starts_at)->format('d M Y, H:i') ?? 'Open' }} → {{ optional($exam->ends_at)->format('d M Y, H:i') ?? 'Open' }} @else Always open @endif

@if ($exam->description)

{{ $exam->description }}

@endif
@if ($attempt?->isCompleted()) @if ($exam->results_published)

Your result

@if ($attempt->passed) Pass @else Fail @endif

{{ $attempt->score }}/{{ $attempt->max_score }} ({{ $attempt->percent() }}%)

Completed {{ optional($attempt->completed_at)->format('d M Y, H:i') }}

@else

Submitted

Your answers were recorded. Results will appear when the teacher publishes them.

Submitted {{ optional($attempt->completed_at)->format('d M Y, H:i') }}

@endif @elseif (! $exam->isOpen())
This exam is outside its scheduled window.
@elseif ($exam->questions->isNotEmpty())

Take exam

@csrf @foreach ($exam->questions as $index => $question)

{{ $index + 1 }}. {{ $question->question }}

@foreach ($question->options as $optIndex => $option) @endforeach
@endforeach
@else
This exam has no questions yet.
@endif