@php $pct = round($attempt->percentage_score ?? 0); $passed = $attempt->passed; $pending= $attempt->status === 'submitted'; // awaiting manual grade $bgClr = $pending ? '#fef3c7' : ($passed ? '#d1fae5' : '#fee2e2'); $txClr = $pending ? '#92400e' : ($passed ? '#065f46' : '#991b1b'); $hdClr = $pending ? '#f59e0b' : ($passed ? '#059669' : '#dc2626'); @endphp
{{ $pending ? '⏳' : $pct.'%' }}
{{ $pending ? 'Pending Review' : ($passed ? 'PASSED' : 'NOT PASSED') }}
{{ $attempt->test->title }}
@if($pending)
Your responses have been submitted. Some questions require manual review by HR. You will be notified by email when grading is complete.
@endif
Your Score {{ $pending ? 'Pending' : $pct.'%' }}
Pass Mark {{ $attempt->test->pass_score }}%
Questions {{ $attempt->responses->count() }}
@if(!$pending)
Result {{ $passed ? '✓ Passed' : '✗ Not Passed' }}
@endif
@if($attempt->test->show_results_immediately && !$pending)
Question Review
@foreach($attempt->responses as $resp) @php $cls = $resp->is_correct === null ? 'manual' : ($resp->is_correct ? 'correct' : 'wrong'); @endphp
{{ $resp->question->question_text }}
@if($resp->question->question_type !== 'short_answer') @php $selIds = json_decode($resp->selected_option_ids ?? '[]', true); @endphp @foreach($resp->question->options as $opt)
{{ $opt->is_correct ? '✓ ' : (in_array($opt->id,$selIds) ? '✗ ' : ' ○ ') }}{{ $opt->option_text }}
@endforeach @else
{{ $resp->text_response }}
⏳ Awaiting HR review
@endif @if($resp->question->explanation && $resp->is_correct !== null)
{{ $resp->question->explanation }}
@endif
@endforeach @endif
Your result has been recorded and HR has been notified.
You may close this window.