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

{{ $quiz->title }}

{{ $quiz->category_label }} {{ $quiz->subject->name ?? '-' }} · {{ $student->class_label }} · Term {{ $quiz->term }}, {{ $quiz->year }}
My assessments
@php $questions = $quiz->questions()->get(); $totalMarks = (float) $questions->sum('marks'); $remaining = max(0, (int) $quiz->attempts_allowed - $used); $canStart = $quiz->status === 'published' && $quiz->availableNow() && $remaining > 0 && !$inProgress; @endphp

Before you start

Read the instructions carefully.
{{ $quiz->instructions ?: 'No special instructions. Answer every question as best you can.' }}
Availability: {{ $quiz->availabilityLabel() }}{{ $quiz->available_until ? ' until '.$quiz->available_until->format('d M Y H:i') : '' }}
Weight: {{ (float) $quiz->weight > 0 ? num($quiz->weight, 0).'% of your term assessment' : 'Progress tracking only' }}
Feedback: {{ $quiz->show_feedback ? 'Correct answers and explanations are shown after you submit.' : 'Your score is shown after the teacher completes grading.' }}
Question pool: {{ (int) $quiz->questions_to_serve > 0 ? 'A random selection of '.num($quiz->questions_to_serve).' questions' : 'All '.num($questions->count()).' questions' }}
@if($quiz->rubric)

Marking rubric

How extended answers are assessed.
{{ $quiz->rubric }}
@endif

My attempts

Your best graded attempt counts towards term marks.
@forelse($attempts as $attempt) @empty @endforelse
AttemptStartedSubmittedStatusScoreAction
#{{ $attempt->attempt_no }} {{ $attempt->started_at?->format('d M Y H:i') ?? '-' }} {{ $attempt->submitted_at?->format('d M Y H:i') ?? '-' }} {{ $attempt->score === null ? '-' : num($attempt->score, 1).'%' }} @if($attempt->status === 'in_progress') Continue @else Review @endif

Start assessment

{{ $quiz->category_label }} · {{ $quiz->subject->name ?? '-' }}
@if($inProgress)

You have an attempt in progress. Continue where you left off. The timer keeps running.

Continue attempt @elseif($canStart)

This assessment has {{ num($questions->count()) }} question{{ $questions->count() === 1 ? '' : 's' }} worth {{ num($totalMarks, 1) }} marks. You have {{ num($remaining) }} attempt{{ $remaining === 1 ? '' : 's' }} left. The {{ num($quiz->duration_minutes) }}-minute timer starts immediately.

@csrf
@elseif($quiz->status !== 'published')
This assessment is closed and no longer accepts submissions.
@elseif(!$quiz->availableNow())
{{ $quiz->availabilityLabel() }}. Come back when it opens.
@else
You have used all {{ num($quiz->attempts_allowed) }} allowed attempt(s). Review your feedback above.
@endif
@endsection