@extends('layouts.portal') @section('title', 'Attempt review') @section('subtitle', $exam->title.' · '.$attempt->code) @section('actions') All attempts @if($attempt->isFinished() && Route::has('exams.report')) Score report (PDF)@endif @endsection @section('content') @php $u = $attempt->user; $fmt = fn ($s) => $s >= 3600 ? intdiv($s, 3600).'h '.intdiv($s % 3600, 60).'m' : intdiv($s, 60).'m '.($s % 60).'s'; $voided = $attempt->status === 'voided'; $pct = $attempt->percent !== null ? (float) $attempt->percent : null; $num = fn ($v) => rtrim(rtrim(number_format((float) $v, 2), '0'), '.'); $eventLabels = ['tab_hidden' => 'Switched to another tab', 'window_blur' => 'Window lost focus', 'fullscreen_exit' => 'Left full-screen', 'copy' => 'Tried to copy', 'paste' => 'Tried to paste', 'context_menu' => 'Opened the context menu', 'auto_submit' => 'Auto-submitted']; $credential = $attempt->credential; @endphp @if($voided)
Browser: {{ $attempt->user_agent }}
Explanation. {{ $r['explanation'] }}