@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $fmt = fn ($n) => $n === null ? '—' : rtrim(rtrim(number_format((float) $n, 2), '0'), '.'); $answers = $result?->answers ?? []; @endphp
← Model tests
@if(! $test->resultsPublished())
Your answers are submitted. Marks and merit position will appear here once results are published.
@elseif(! $result || $result->is_absent || $result->marks === null)
You did not sit this test.
@else
@if($test->isOnline()) @endif
@if($review->isNotEmpty())
@foreach($review as $index => $testQuestion) @php $question = $testQuestion->question; $given = $answers[$question->id] ?? null; $correct = array_map('strval', $question->correct_answer ?? []); @endphp

{{ $index + 1 }}. {{ $question->body }}

@foreach($question->options ?? [] as $option) @php $isCorrect = in_array((string) $option['key'], $correct, true); $isGiven = (string) $given === (string) $option['key']; @endphp
{{ $option['key'] }}. {{ $option['label'] }} @if($isCorrect) ✓ @endif @if($isGiven && ! $isCorrect) — your answer @endif
@endforeach
@if($given === null)

Skipped

@endif
@endforeach
@endif @endif