@if($isSubmitted)
@if($isPassed)

Congratulations!

You passed the exam with {{ number_format($score, 2) }}% score.

Back to Courses
@else

Exam Failed

You scored {{ number_format($score, 2) }}%. Required: {{ $exam->passing_percentage }}%.

Back to Courses
@endif
@else
Question {{ $currentQuestionIndex + 1 }} of {{ $questions->count() }}
@php $question = $questions->get($currentQuestionIndex); @endphp @if($question->context)
{!! nl2br(e($question->context)) !!}
@endif
{{ $currentQuestionIndex + 1 }})
{!! nl2br(e($question->question_text)) !!}
@foreach($question->options as $option) @php $isSelected = isset($answers[$question->id]) && $answers[$question->id] == $option['id']; @endphp @endforeach
@endif