@extends('partials.app') @section('content')
@csrf
@if ($examPaper->isEmpty())
This assessment has no questions. Submit to complete it successfully.
@endif @foreach($examPaper as $index => $question)
Question {{ $index + 1 }}
{{ $question->question_text }}
{{-- CASE 1: YES/NO QUESTIONS --}} @if($question->question_type == 'yes_no' || $question->question_type == '')
{{-- CASE 2: MCQ QUESTIONS --}} @elseif($question->question_type == 'mcq') @php // Ensure options are handled as an array $options = is_array($question->options) ? $question->options : json_decode($question->options, true); @endphp @if($options) @foreach($options as $optIndex => $option)
@endforeach @endif @endif
@endforeach
@push('scripts') @endpush @endsection