@extends('layouts.examiner') @section('title', 'Reset Management') @section('content')

Reset Management

{{ $onlineCandidates->count() }} Currently Online
{{-- Flash messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- ── Row 1: Least dangerous — IP / time adjustments ─────────────────── --}}
{{-- Reset IP / Add Time (single, online candidate) --}}
Reset IP / Add Time (Single)

Clears the IP lock for a candidate who is currently active in an exam. Optionally adds extra minutes. Candidate must be currently online.

@csrf
{{-- Reopen Submitted Exam --}}
Reopen Submitted Exam

Re-activates a candidate who has already submitted, giving them a fresh time allocation. Works even when the candidate is offline.

@csrf
{{-- ── Row 2: Bulk IP reset (no data loss) ────────────────────────────── --}}
{{-- Reset IP / Add Time (all online) --}}
Reset IP / Add Time (All Online)

Clears the IP lock for every currently active candidate so they can log back in from a different terminal. Optionally adds extra minutes to all of them.

@if($onlineCandidates->isEmpty())

No candidates currently online.

@else
@csrf
@endif
{{-- ── Row 3: Destructive actions ──────────────────────────────────────── --}}
{{-- Reset single candidate exam (full wipe) --}}
Reset Candidate Exam

Completely removes a candidate's exam record, answers and status so they can re-sit. Clears their IP lock. This cannot be undone.

@csrf
{{-- Reset ALL online candidates (most destructive) --}}
Reset ALL Online Candidates

Fully wipes exam records, answers and status for every candidate currently writing. Use with extreme caution.

@if($onlineCandidates->isEmpty())

No candidates currently online.

@else
@csrf
@endif
{{-- ── Online Candidates Table ─────────────────────────────────────────── --}}
Candidates Currently Online
{{ $onlineCandidates->count() }}
@forelse($onlineCandidates as $i => $exam) @php $cand = $exam->candidate; @endphp @if($cand) @endif @empty @endforelse
# Reg No Name Gender Department IP Time Left (min) Started Actions
{{ $i + 1 }} {{ $cand->reg_no }} {{ $cand->full_name }} {{ $cand->gender_label }} {{ optional($cand->department)->name ?? '—' }} {{ $cand->ip ?? '—' }} {{ $exam->remaining_time ?? '—' }} {{ $exam->started_at ? $exam->started_at->format('H:i') : '—' }}
{{-- Quick reset-time prefill --}} {{-- Quick full reset --}}
No candidates currently online.
@endsection @push('scripts') @endpush