@extends('layouts.app') @section('title', $quiz->title) @section('content')

{{ $quiz->title }}

{{ $quiz->category_label }} {{ $quiz->subject->name ?? '-' }} · {{ $quiz->schoolClass->name ?? '-' }}{{ $quiz->stream ? ' / '.$quiz->stream : '' }} · Term {{ $quiz->term }}, {{ $quiz->year }} · {{ $quiz->domain }} domain
All assessments Results @if($quiz->status === 'draft')
@csrf
@elseif($quiz->status === 'published')
@csrf
@else
@csrf
@endif
@include('academics._nav')

Question bank

Objective questions are auto-graded with answer feedback. Short answers and essays use the rubric for manual grading.
@if($questions->isEmpty()) @else
@foreach($questions as $index => $question) @php $optionsText = collect($question->options ?? [])->map(fn ($o) => ($o['key'] ?? '').'. '.($o['text'] ?? ''))->implode("\n"); $pairsText = collect($question->match_pairs ?? [])->map(fn ($p) => ($p['left'] ?? '').' = '.($p['right'] ?? ''))->implode("\n"); @endphp
Q{{ $index + 1 }}
{{ $question->type_label }} {{ num($question->marks, 1) }} mark{{ (float) $question->marks === 1.0 ? '' : 's' }} @if($question->isManual()) Manual grading @else Auto-graded @endif
{{ $question->prompt }}
@if($question->type === 'mcq' && !empty($question->options))
    @foreach($question->options as $option)
  • answer) style="font-weight:650;color:var(--success)" @endif> {{ $option['key'] ?? '' }}. {{ $option['text'] ?? '' }} @if(($option['key'] ?? '') === $question->answer) Correct @endif
  • @endforeach
@elseif($question->type === 'matching' && !empty($question->match_pairs))
@foreach($question->match_pairs as $pair)
{{ $pair['left'] ?? '' }} → {{ $pair['right'] ?? '' }}
@endforeach
@elseif($question->isObjective())
Answer: {{ $question->correctAnswerText() }}
@endif @if($question->explanation)
Feedback: {{ $question->explanation }}
@endif @if($question->rubric)
Rubric: {{ $question->rubric }}
@endif
@csrf @method('DELETE')
@endforeach
@endif

Instructions & rubric

Shared with learners before they start.
Instructions
{{ $quiz->instructions ?: 'No learner instructions added yet.' }}
Marking rubric
{{ $quiz->rubric ?: 'No rubric added yet.' }}

Settings

Control availability, weighting and feedback.
Status{{ ucfirst($quiz->status) }}
Availability{{ $quiz->availabilityLabel() }}
Opens{{ $quiz->available_from?->format('d M Y H:i') ?? 'Immediately' }}
Closes{{ $quiz->available_until?->format('d M Y H:i') ?? 'No deadline' }}
Duration{{ num($quiz->duration_minutes) }} minutes
Attempts allowed{{ num($quiz->attempts_allowed) }}
Pass mark{{ num($quiz->pass_mark, 0) }}%
Term weight{{ (float) $quiz->weight > 0 ? num($quiz->weight, 1).'%' : 'Progress only' }}
Question pool{{ (int) $quiz->questions_to_serve > 0 ? 'Random '.num($quiz->questions_to_serve).' of '.num($questions->count()) : 'All questions' }}
Shuffle{{ $quiz->shuffle_questions ? 'Questions' : 'Fixed order' }}{{ $quiz->shuffle_options ? ' + options' : '' }}
Feedback{{ $quiz->show_feedback ? 'Show answers & explanations' : 'Score only' }}
Linked exam @if($quiz->exam)
{{ $quiz->exam->name }}
{{ num($quiz->exam->percentage, 1) }}% weighting
@else Not linked @endif

Recent attempts

Best attempt feeds the term register.
@forelse($attempts as $attempt) @empty @endforelse
LearnerScoreStatus
{{ $attempt->student->full_name ?? 'Unknown learner' }}
{{ $attempt->student->stream ?? '' }}{{ $attempt->submitted_at ? ' · '.$attempt->submitted_at->format('d M H:i') : '' }}
{{ $attempt->score === null ? '-' : num($attempt->score, 1).'%' }}
@csrf
Enter one option per line; A, B, C ... are assigned in order.
Partial credit is awarded per correctly matched pair.
@foreach($questions as $question) @php $optionsText = collect($question->options ?? [])->map(fn ($o) => ($o['key'] ?? '').'. '.($o['text'] ?? ''))->implode("\n"); $pairsText = collect($question->match_pairs ?? [])->map(fn ($p) => ($p['left'] ?? '').' = '.($p['right'] ?? ''))->implode("\n"); @endphp
@csrf @method('PUT')
@endforeach
@csrf @method('PUT')
@endsection @push('scripts') @endpush