@extends('layouts.exam') @section('title', 'Exam — ' . $attempt->post?->title) @section('content') @php $isReview = $attempt->isInReview(); $questionsPerExam = config('exam.questions_per_exam'); $secondsPerQuestion = config('exam.seconds_per_question'); $heartbeatInterval = config('exam.heartbeat_interval_seconds', 25); $maxTabSwitch = config('exam.max_tab_switch_warnings', 3); $maxFullscreen = config('exam.max_fullscreen_exit_warnings', 3); @endphp
{{-- Gradient timer bar (fills the top, drains as time passes) --}}
{{-- ── TOP BAR ── --}}
FDRS
@if($isReview) @else @endif {{ $isReview ? 'Review mode' : 'Exam mode' }} {{ $attempt->post?->title }} — Roll {{ $attempt->application?->roll_number }} Connection secure {{-- Save-status chip. Mirrors the state of the localStorage answer queue in a glance: - synced → green "Saved ✓" - saving → cyan "Saving…" - pending:N → amber "Pending: N" (answers queued, will retry) - offline:N → red "Offline — N held" (2+ consecutive failures) --}} Saved ✓ {{ $answeredCount }}/{{ $questionsPerExam }} Warnings: {{ $attempt->warning_count }} 00:00
{{-- ── BODY ROW ── --}}
{{-- ── PALETTE PANEL ── --}}
Question Palette
Answered
Current
Unanswered
@for($i = 1; $i <= $questionsPerExam; $i++) @endfor
{{-- ── MAIN AREA ── --}}
{{-- Review banner --}}
Review Mode: You are in the 10-minute review window. Review time remaining: --:--
{{-- Question header --}}
Question 1 of {{ $questionsPerExam }} 0 of {{ $questionsPerExam }} answered
{{-- Question content --}}
Loading...
@foreach(['a','b','c','d'] as $opt) @endforeach
Clear Selection
{{-- Nav footer --}}
{{-- /main-area --}}
{{-- /body-row --}}
{{-- /exam-root --}} {{-- ── WARNING TOAST ── --}} {{-- ── CONNECTION STATUS BAR ── --}}
Connection lost. Reconnecting... Your progress is auto-saved.
{{-- ── SUBMIT LOCK OVERLAY ── Shown during the final-submit retry loop. Prevents the candidate from closing the tab while we're hammering the server to commit their answers. Disappears only on successful submit OR when the recovery modal takes over. --}} {{-- ── RECOVERY MODAL ── Last-resort fallback when CSRF is permanently dead / session is dead / the final submit has failed repeatedly. Shows the candidate a recovery payload (their attempt ID + answers from localStorage) so a supervisor can manually commit the exam. This is the safety net that prevents an answer from ever being silently lost to a network or auth failure. --}} {{-- ── SUBMIT CONFIRMATION MODAL ── --}} @push('scripts') @endpush @endsection