@if($quiz)
{{ $quiz->subject->name }}@if($quiz->chapter) - {{ $quiz->chapter->name }}@endif {{ __('student.quiz.question_x_of_y', ['current' => $currentQuestionIndex + 1, 'total' => $quiz->total_questions]) }}
{{ gmdate('i:s', $timeSpent) }}
@if($currentQuestion)

{{ $currentQuestion->question_text }}

@if($hasMultipleCorrectAnswers)
{{ __('student.quiz.multiple_answers_allowed') }}
@endif @foreach((array)$currentQuestion->options as $key => $option) @php $letter = strtoupper($key); // a -> A, b -> B, etc. $answerId = 'answer_' . $currentQuestionIndex . '_' . $letter; $isSelected = in_array($letter, $selectedAnswers); @endphp
@endforeach
@endif
@for($i = 0; $i < $quiz->total_questions; $i++) @php $question = $quiz->questions[$i]; $isAnswered = !is_null($question->pivot->answered_at); $isCurrent = $i === $currentQuestionIndex; $dotClass = $isCurrent ? 'active' : ($isAnswered ? 'completed' : ''); @endphp @endfor
@if($isLastQuestion) @else @endif
@endif
@push('scripts') @endpush