@extends('layouts.main_dashboard.app') @section('title', $examBank->title) @section('skip_page_hero', true) @section('content') @php $isArabic = app()->getLocale() === 'ar'; $types = config('exam-engine.question_types'); @endphp
{{-- Header --}}

{{ $examBank->title }}

{{ $questions->total() }} {{ $isArabic ? 'سؤال' : 'questions' }}

{{-- Add Question Form --}}

{{ $isArabic ? 'سؤال جديد' : 'New Question' }}

@csrf
{{-- Options (for choice questions) --}}
{{-- Model answer for text questions --}}
@if(session('success'))
{{ session('success') }}
@endif {{-- Questions List --}}
@if($questions->isEmpty())
{{ $isArabic ? 'لا توجد أسئلة بعد. أضف أول سؤال.' : 'No questions yet. Add the first one.' }}
@else
@foreach($questions as $i => $q)
{{ $q->question_type }} {{ $q->default_points }} {{ $isArabic ? 'درجة' : 'pts' }}

{{ Str::limit($q->prompt, 120) }}

@if($q->options->isNotEmpty())
@foreach($q->options as $opt) {{ $opt->option_key }}: {{ Str::limit($opt->label, 30) }} @endforeach
@endif
@csrf @method('DELETE')
@endforeach
{{ $questions->links() }}
@endif
@endsection