@extends('layouts.cbt') @section('page-title', 'Hasil Ujian') @section('sidebar')@include('components.siswa-sidebar')@endsection @section('content')
{{ $attempt->exam->subject->name }}
{{ $attempt->score }}
{{ $attempt->isPassed() ? 'SELAMAT! Anda Lulus' : 'Perlu Remedial' }}
KKM: {{ $attempt->exam->passing_score }} | Durasi: {{ $attempt->exam->duration_minutes }} menit
{!! $answer->question->content !!}
@if($answer->question->type->value === 'essay')Jawaban: {{ $answer->essay_answer }}
Nilai: {{ $answer->points_earned }}/{{ $answer->question->points }}
@elseif($answer->question->type->value === 'pg_kompleks') @php $selected = $answer->question->options->whereIn('id', $answer->selected_option_ids ?? []); $correct = $answer->question->options->where('is_correct', true); @endphpJawaban Anda: @if($selected->isNotEmpty()) {{ $selected->map(fn($o) => $o->label.'. '.$o->content)->join(' | ') }} @else - @endif {{ $answer->is_correct ? '(Benar)' : '(Salah)' }}
@if(!$answer->is_correct)Kunci: {{ $correct->map(fn($o) => $o->label.'. '.$o->content)->join(' | ') }}
@endif @elseJawaban Anda: {{ $answer->selectedOption?->label ?? '-' }}. {{ $answer->selectedOption?->content }} {{ $answer->is_correct ? '(Benar)' : '(Salah)' }}
@endif @if($answer->question->explanation){{ $answer->question->explanation }}
@endif