@extends('layouts.app') @section('content')

Quiz Results

Congratulations, {{ $employeeQuiz->name }}!

{{ $employeeQuiz->score }}/{{ count($employeeQuiz->quiz->questions) }}

Your Final Score

{{ $employeeQuiz->quiz->name }}
Quiz Name
{{ round(($employeeQuiz->score / count($employeeQuiz->quiz->questions)) * 100) }}%
Success Rate
{{ $timeTaken }}s
Time Taken
{{ count($employeeQuiz->quiz->questions) }}
Total Questions
@if (!$employeeQuiz->quiz->is_active)

Answer Breakdown

@foreach ($employeeQuiz->employeeQuizParticipations as $index => $participation)
Q{{ $index + 1 }} {{ $participation->question->question_text }}
Your Answer: @if ($participation->selectedOption) {{ $participation->selectedOption->option_text }} @else No answer @endif
Correct Answer: {{ $participation->question->options->firstWhere('is_correct', true)->option_text }}
@if ( $participation->selectedOption && $participation->selectedOption->id === $participation->question->options->firstWhere('is_correct', true)->id)
Correct
@else
Incorrect
@endif
@endforeach
@endif
@endsection