@extends('layouts.app') @section('title', $exam->title) @section('page-title', $exam->title) @section('content')

{{ $exam->title }}

By {{ $exam->tester->name }} @if($exam->tester->organization) ยท {{ $exam->tester->organization }} @endif
{{ ucfirst($exam->status) }}
@if($exam->description)

{{ $exam->description }}

@endif
{{ $exam->duration_minutes }} min
Duration
{{ $exam->totalQuestions() }}
Questions
{{ $exam->pass_percentage }}%
Pass Mark
{{ $exam->max_attempts }}
Max Attempts
@if($exam->start_at || $exam->end_at)
@if($exam->start_at)
Opens: {{ $exam->start_at->format('D, M j Y โ€” H:i') }}
@endif @if($exam->end_at)
Closes: {{ $exam->end_at->format('D, M j Y โ€” H:i') }}
@endif
@endif @if($exam->instructions)
Instructions

{{ $exam->instructions }}

@endif
{{-- Registration / Action panel --}} @if($registration)
Registration Status
@php $statusMap = [ 'pending' => ['label' => 'Awaiting Approval', 'class' => 'badge-warning', 'icon' => 'bi-hourglass-split'], 'approved' => ['label' => 'Approved', 'class' => 'badge-success', 'icon' => 'bi-check-circle'], 'completed' => ['label' => 'Completed', 'class' => 'badge-info', 'icon' => 'bi-check2-all'], 'rejected' => ['label' => 'Rejected', 'class' => 'badge-danger', 'icon' => 'bi-x-circle'], ]; $s = $statusMap[$registration->status] ?? ['label' => ucfirst($registration->status), 'class' => 'badge-muted', 'icon' => 'bi-dot']; @endphp {{ $s['label'] }} @if($registration->payment_required && !$registration->payment_confirmed)
Payment of ${{ number_format($exam->price_per_candidate, 2) }} is required to take this exam.
Pay & Confirm Registration @elseif($registration->status === 'approved' && $registration->canAttempt() && $exam->isActive())
You are cleared to take this exam. Good luck!
Start Exam Now @elseif(!$exam->isActive())
@if($exam->start_at && $exam->start_at->isFuture()) The exam has not started yet. It opens on {{ $exam->start_at->format('M j, Y H:i') }}. @else This exam is not currently active. @endif
@elseif(!$registration->canAttempt())
You have used all {{ $exam->max_attempts }} allowed attempt(s).
@endif {{-- Past attempts --}} @if(count($attempts) > 0)
Your Attempts
@foreach($attempts as $att)
Attempt #{{ $att->attempt_number }} {{ $att->submitted_at?->format('M j, Y') }}
@if($att->status === 'graded') {{ round($att->percentage) }}% โ€” {{ $att->grade_label }} Result @else {{ ucfirst($att->status) }} @endif
@endforeach
@endif
@else
๐Ÿ“‹
Not Yet Registered

Register to take this exam.

@csrf @if($exam->access_code)
@endif
@endif
Back to Dashboard
@endsection