@extends('layouts.admin') @section('content') @php $language = $exam->language ?? 'both'; $showHindi = in_array($language, ['hindi', 'both']); $showEnglish = in_array($language, ['english', 'both']); $isBilingual = $language === 'both'; @endphp
{{-- Header --}}

Add Question

{{ $exam->title }}

{{ $exam->exam_type }} @if($exam->subject && $exam->subject !== 'All Subjects') 📚 {{ $exam->subject }} @endif @if($exam->difficulty_level) {{ $exam->difficulty_level }} @endif 🌐 {{ ucfirst($language) === 'Both' ? 'हिन्दी + English' : ucfirst($language) }}
{{-- AI Generate Button + Modal --}}
@include('admin.questions.partials.ai-modal')
@if(session('success'))
✅ {{ session('success') }}
@endif
@csrf {{-- Question Text --}}

Question

@if($isBilingual) Write in both Hindi & English @elseif($showHindi) Write in Hindi @else Write in English @endif

@if($showHindi)
@if($isBilingual) 🇮🇳 हिन्दी @endif
@endif @if($showEnglish)
@if($isBilingual) 🇬🇧 English @else @endif
@endif
{{-- Options --}}

Answer Options

Click letter (A/B/C/D) to mark the correct answer

@for($i = 0; $i < 4; $i++)
{{ chr(65 + $i) }}
@if($showHindi) @endif @if($isBilingual) @endif @if($language === 'english') @endif
@endfor
{{-- Explanation --}}

Explanation (optional)

@if($showHindi)
@if($isBilingual) 🇮🇳 हिन्दी @endif
@endif @if($showEnglish)
@if($isBilingual) 🇬🇧 English @else @endif
@endif
{{-- Actions --}}
Cancel
{{-- RIGHT: Live Preview --}}

Student Preview

Live
{{ $exam->difficulty_level ?? 'Medium' }}

Your question will appear here...

@if($isBilingual)

@endif
Marks {{ $exam->marks_per_question ?? 1 }}
Negative {{ $exam->negative_enabled ? '-' . $exam->negative_marking : 'None' }}
@endsection