{{-- My exams table, shared by the dashboard and the exams page. --}}
@forelse ($rows as $row) @php($assignment = $row['assignment']) @empty @endforelse
Exam Status Assigned Due Attempts Action
{{ $row['exam']?->display_name ?? $row['exam']?->name }}
{{ $row['exam']?->duration_minutes }} min · pass {{ rtrim(rtrim(number_format((float) $row['exam']?->passing_percentage, 2), '0'), '.') }}%
@if ($row['openAttempt']) In Progress @elseif ($row['completedAttempts'] > 0) Completed @elseif ($row['expired']) Expired @elseif (! $assignment->isActive()) Cancelled @else Assigned @endif {{ $assignment->assigned_at?->format('d M Y') }} {{ $assignment->due_at?->format('d M Y H:i') ?? 'No due date' }} {{ $row['attemptsUsed'] }} / {{ $assignment->attempts_allowed }} @if ($row['openAttempt']) Continue Exam @elseif ($row['canStart']) Start Exam @endif @if ($row['lastCompleted']) View Result @endif @if (! $row['canStart'] && ! $row['openAttempt'] && ! $row['lastCompleted']) {{ $row['issues'][0] ?? 'Not available' }} @endif