{{-- ── Sticky header ────────────────────────────────────── --}}
{{ config('cbt.school') }}
Computer Based Test
@if(config('cbt.recording_enabled')) {{-- Recording status indicator (hidden until camera starts) --}} @endif
@php $opts = ['A','B','C','D']; $unanswered = collect($questionIds)->keys()->filter(fn($i) => !session("answers.{$i}"))->values(); $answered = count($questionIds) - $unanswered->count(); $total_qs = count($questionIds); $percentage = $total_qs > 0 ? (int)(($answered / $total_qs) * 100) : 0; $mins = $remainingMinutes ?? 0; @endphp {{-- ── Timer + submit bar ───────────────────────────────── --}}
@if($canSubmit) Submit @endif
{{-- ── Question navigation pills (hidden when recording) ───── --}} @if($total > 1 && !config('cbt.recording_enabled'))
@endif {{-- ── Question card ───────────────────────────────────── --}}
Question {{ $questionIndex + 1 }}
{!! $question->question ?? '' !!}
@foreach($options as $i => $opt) @php $sel = ($checkedOption == $opt['id']) ? ' selected' : ''; @endphp
@endforeach
{{-- Previous hidden when recording is active --}} @if($questionIndex > 0 && !config('cbt.recording_enabled')) @endif @if($questionIndex < $total - 1) @else @if($canSubmit) Submit @endif @endif
{{-- Auto-advance countdown (independent of live recording, not last question) --}} @if(config('cbt.auto_nav_enabled') && $questionIndex < $total - 1)

Next question in {{ (int) config('cbt.auto_nav_seconds', 15) }}s  —  Skip now

@endif
{{-- ── Footer: keyboard hints + progress ─────────────────── --}}
{{-- ── Submit confirmation modal ──────────────────────────────── --}} {{-- ── Calculator modal ───────────────────────────────────── --}} @if(config('cbt.recording_enabled')) {{-- Blocking overlay shown if camera/mic become unavailable after exam starts --}} @endif @if(config('cbt.noise_detection_enabled')) @endif @if(config('cbt.window_blur_detection_enabled')) @endif