Autism Training Program

Exercise Data Report for Supervisor

Supervisor: {{ $supervisorName ?: 'N/A' }}
Institution: {{ $institution ?: 'N/A' }}
Generated: @php $offsetMinutes = intval($timezoneOffset ?? 0); $sign = $offsetMinutes >= 0 ? '+' : '-'; $absOffset = abs($offsetMinutes); $hours = intdiv($absOffset, 60); $mins = $absOffset % 60; $tzString = sprintf("UTC%s%d:%02d", $sign, $hours, $mins); $tz = new \DateTimeZone(sprintf("%s%02d%02d", $sign, $hours, $mins)); $now = new \DateTime('now', $tz); @endphp {{ $now->format('D, M d, Y g:i A') }} ({{ $tzString }})

Session Summary

@if(empty($reportData) || count($reportData) === 0)

No exercise data available.

@else @foreach($reportData as $row) @php $labels = [ 'P1' => 'P1 – Sensory', 'P0' => 'P1E2 – Listening', 'P2' => 'P2 – Social', 'P3' => 'P3 – Flexibility', 'P4' => 'P4 – Language', 'P5' => 'P5 – Motor', 'P6' => 'P6 – Attention' ]; $profileKey = $row['profile'] ?? ''; $profileLabel = $labels[$profileKey] ?? $profileKey; $level = $row['level'] ?? 'N/A'; $correctCount = $row['correctCount'] ?? $row['correct_count'] ?? 0; $wrongCount = $row['wrongCount'] ?? $row['wrong_count'] ?? 0; $totalRounds = $row['totalRounds'] ?? ($correctCount + $wrongCount); $successRate = $row['successRate'] ?? ($totalRounds > 0 ? round(($correctCount / $totalRounds) * 100) : 0); $avgTime = $row['avgTime'] ?? 0; $rounds = $row['rounds'] ?? []; $timestamp = $row['timestamp'] ?? 0; // Convert timestamp to user timezone $offsetMinutes = intval($timezoneOffset ?? 0); $sign = $offsetMinutes >= 0 ? '+' : '-'; $absOffset = abs($offsetMinutes); $hours = intdiv($absOffset, 60); $mins = $absOffset % 60; $tz = new \DateTimeZone(sprintf("%s%02d%02d", $sign, $hours, $mins)); if ($timestamp > 0) { $dt = new \DateTime('@' . intval($timestamp / 1000)); $dt->setTimezone($tz); $dateStr = $dt->format('m/d/Y g:i:s A'); } else { $dateStr = 'N/A'; } @endphp

{{ $profileLabel }}

Level: {{ $level }}

🕐 {{ $dateStr }}
{{ $totalRounds }} items Avg Time: {{ number_format($avgTime, 2) }}s

✅ Correct: {{ $correctCount }}

❌ Wrong: {{ $wrongCount }}

Success rate: {{ number_format($successRate, 0) }}% ({{ $correctCount }}/{{ $totalRounds }})

@if(!empty($rounds))
@foreach($rounds as $round) @php $roundLabel = $round['label'] ?? ('Round ' . ($round['roundNumber'] ?? '?')); $isCorrect = $round['isCorrect'] ?? false; $responseTime = $round['responseTime'] ?? null; $roundType = $round['type'] ?? 'SELECTION'; @endphp
@if($roundType === 'TIMEOUT') ⚠️ {{ $roundLabel }}: Timeout @elseif($isCorrect) {{ $roundLabel }}: Found in {{ $responseTime !== null ? number_format($responseTime, 3) : '?' }}s @else {{ $roundLabel }}: Error @endif
@endforeach @endif
@endforeach @endif