@extends('admin.layout.app') @section('body')

{{ __('admin.questions_builder') }}

{{ __('admin.quiz_2') }} {{ $quiz->title }} {{ __('admin.total_2') }} {{ $questions->count() }}
@if(session('msg'))
{{ session('msg') }}
@endif {{-- Publish hint --}}
{{ __('admin.for_mcq_add_options_and_mark') }} {{ __('admin.one') }} {{ __('admin.as_correct_then_publish_the_quiz') }}
@forelse($questions as $q) @php $correctMcq = $q->type === 'mcq' ? $q->options->firstWhere('is_correct', true) : null; $correctTF = $q->type === 'true_false' ? (is_null($q->correct_true_false) ? null : ($q->correct_true_false ? 'True' : 'False')) : null; @endphp @empty @endforelse
# {{ __('admin.question') }} {{ __('admin.type_2') }} {{ __('admin.points_2') }} {{ __('admin.correct_2') }} {{ __('admin.actions') }}
#{{ $q->id }}
{{ __('admin.order_2') }}: {{ $q->sort_order }}
{{ \Illuminate\Support\Str::limit($q->question_text, 140) }}
@if($q->explanation)
{{ \Illuminate\Support\Str::limit($q->explanation, 90) }}
@endif
{{ strtoupper($q->type) }} {{ $q->points }} pt @if($q->type === 'mcq') @if($correctMcq) {{ __('admin.correct_set') }}
{{ $correctMcq->option_text }}
@else {{ __('admin.no_correct') }}
{{ __('admin.options') }}: {{ $q->options->count() }}
@endif @else @if($correctTF === null) {{ __('admin.no_correct') }} @else ✓ {{ $correctTF }} @endif @endif
@csrf @method('DELETE')
{{ __('admin.no_questions_yet') }}
@endsection