@extends('layouts.portal') @section('title', $exam->title) @section('subtitle', ($exam->course?->title ?? 'Not linked to a course').' · '.$exam->code) @section('actions') Attempts Settings @endsection @section('content') @php $drawn = $exam->drawSize(); $short = $stats['active'] < $exam->question_count; $passRate = $stats['attempts'] ? round($stats['passed'] / $stats['attempts'] * 100) : null; $openAdd = old('_form') === 'add-question'; @endphp @if($short)
The question bank is smaller than the draw size. Each attempt is set to draw {{ $exam->question_count }} questions but only {{ $stats['active'] }} {{ \Illuminate\Support\Str::plural('is', $stats['active']) === 'is' ? 'is' : 'are' }} active, so learners will get {{ $drawn }}. Add questions below or import a CSV.
@endif
Questions{{ $stats['total'] }}{{ $stats['active'] }} active · {{ $stats['total'] - $stats['active'] }} retired
Completed attempts{{ $stats['attempts'] }}View all attempts
Pass rate{{ $passRate !== null ? $passRate.'%' : '—' }}{{ $stats['attempts'] ? 'Average score '.$stats['avg'].'%' : 'No results yet' }}
Flagged attempts{{ $stats['flagged'] }}@if($stats['flagged'])Review integrity events@else No integrity events @endif

Question bank

@if(array_filter($filters))Clear@endif
@forelse($questions as $q) @empty @endforelse
#QuestionDomainTypeLevelMarksStatus
{{ $q->id }} {{ \Illuminate\Support\Str::limit($q->question, 150) }}{{ count((array) $q->options) }} options · answer {{ implode(', ', (array) $q->correct) }} {{ $q->domain ?: '—' }} {{ $q->type === 'truefalse' ? 'True/False' : ucfirst($q->type) }} {{ ucfirst($q->difficulty) }} {{ rtrim(rtrim(number_format((float) $q->marks, 2), '0'), '.') }}
@csrf @method('DELETE')
{{ $questions->links() }}
@endsection @push('scripts')@endpush