@extends('layouts.public') @section('title', 'Borang Penilaian — ' . $program->title) @section('hero')

{{ $program->title }}

Borang Penilaian Program
@endsection @section('content')
{{ $pq->questionnaireSet->title }}

Sila jawab semua soalan sebelum memuat turun sijil anda, {{ $participant->name }}.

@csrf @php $qNum = 0; @endphp @foreach($questions as $q) @if($q->question_type === 'tajuk') {{-- ── Section header ─────────────────────────────── --}}
{{ $q->question_text }}
@foreach($q->children as $child) @php $qNum++ @endphp
@error('q_' . $child->id)
{{ $message }}
@enderror
@for($i = 1; $i <= 5; $i++)
id) == $i ? 'checked' : '' }}>
@endfor
@endforeach @else {{-- ── Standalone question ─────────────────────────── --}} @php $qNum++ @endphp
@error('q_' . $q->id)
{{ $message }}
@enderror @if($q->question_type === 'rating')
@for($i = 1; $i <= 5; $i++)
id) == $i ? 'checked' : '' }}>
@endfor
@elseif($q->question_type === 'single_choice') @foreach($q->options_json ?? [] as $opt)
id) === $opt ? 'checked' : '' }}>
@endforeach @elseif($q->question_type === 'multiple_choice') @foreach($q->options_json ?? [] as $opt)
id) ?? [])) ? 'checked' : '' }}>
@endforeach @elseif($q->question_type === 'short_text') @elseif($q->question_type === 'long_text') @endif
@endif @endforeach
@endsection