{{-- Question Settings Grid --}}
@foreach ($this->questionType as $type) {{ $type['label'] }} @endforeach @if (isset($this->languages)) @foreach ($this->languages as $lang) {{ $lang->name }} @if (isset($this->existing_languages) && in_array($lang->short_name, $this->existing_languages)) (Existing) @endif @endforeach @else English Hindi @endif -- Select Exam -- @if (isset($this->exams) && count($this->exams) > 0) @foreach ($this->exams as $exam) {{ $exam->title }} @endforeach @endif -- Select Subject -- @if (isset($this->subjects) && count($this->subjects) > 0) @foreach ($this->subjects as $subject) {{ $subject->name }} @endforeach @endif Text Image
@error('subject_id')
{{ $message }}
@enderror @error('exam_id')
{{ $message }}
@enderror {{-- Exam Session Selection --}}
-- Select Session -- @if (isset($this->examSessions) && count($this->examSessions) > 0) @foreach ($this->examSessions as $session) {{ $session->date->format('d M Y') }} - Shift {{ $session->shift_number }} ({{ $session->start_time->format('h:i A') }} - {{ $session->end_time->format('h:i A') }}) @endforeach @endif
@error('exam_session_id')
{{ $message }}
@enderror {{-- Question Text or Image --}} @if ($this->question_content_type === 'text') @else
{{-- Show existing image with remove option --}} @if (isset($this->existing_question_image) && $this->existing_question_image && !$this->question_image)
Current question image

{{ basename($this->existing_question_image) }}

@else {{-- File input for new image --}} {{-- Preview new upload --}} @if ($this->question_image)
Question preview

New image selected

@endif @endif
@endif {{-- Explanation --}} {{-- Options for MCQ (exactly 4 options) --}} @if ($this->question_type === 'mcq')
Options (4 Required) Select one correct answer
@error('correct_option')
{{ $message }}
@enderror @foreach ($this->options as $index => $option)
Option {{ chr(65 + $index) }}
{{-- Content Type Toggle --}} Text Image {{-- Is Correct Radio --}}
{{-- Option Content --}} @if (($option['content_type'] ?? 'text') === 'text') @else
{{-- Show existing image with remove option --}} @if (isset($option['existing_image']) && $option['existing_image'] && !isset($option['image']))
Current option image

{{ basename($option['existing_image']) }}

@else @if (isset($this->options[$index]['image']) && $this->options[$index]['image'])
Option preview

New image selected

@endif @endif
@endif
@endforeach
@endif {{-- Options for MSQ (minimum 2, can add more) --}} @if ($this->question_type === 'msq')
Options (Minimum 2) Select multiple correct answers
@error('options')
{{ $message }}
@enderror @foreach ($this->options as $index => $option)
Option {{ chr(65 + $index) }}
{{-- Content Type Toggle --}} Text Image {{-- Is Correct Checkbox --}} {{-- Remove Button (only if more than 2 options) --}} @if (count($this->options) > 2) @endif
{{-- Option Content --}} @if (($option['content_type'] ?? 'text') === 'text') @else
{{-- Show existing image with remove option --}} @if (isset($option['existing_image']) && $option['existing_image'] && !isset($option['image']))
Current option image

{{ basename($option['existing_image']) }}

@else @if (isset($this->options[$index]['image']) && $this->options[$index]['image'])
Option preview

New image selected

@endif @endif
@endif
@endforeach
@endif {{-- Descriptive Answer Section --}} @if ($this->question_type === 'descriptive')
@endif