@if (Session::has('success'))
{{ Session::get('success') }}
@endif
@if (Session::has('fail'))
{{ Session::get('fail') }}
@endif
Test Report({{ $onlineTest->name }})
Total Question: {{ $questionsCount }}
Total Attempted: {{ $responsesCount }}
Total Correct: {{ $correctResponsesCount }}
Total Incorrect: {{ $responsesCount - $correctResponsesCount }}
Marks Obtained: {{$correctResponsesCount }}
@foreach ($mergedData as $index => $questiondata)
@endforeach
{{ $index + 1 }}. {!! $questiondata['question'] !!}
-
@foreach (range(1, 4) as $optionNumber)
@php
$optionClass = '';
$icon = '';
$label = '';
// Check if the option is marked
if ($questiondata['marked_answer'] == $optionNumber) {
$optionClass = 'text-danger';
$icon = '';
$label = 'Marked Incorrect';
}
// Check if the option is correct and marked
if ($questiondata['marked_answer'] == $questiondata['correct_answer'] && $questiondata['marked_answer'] == $optionNumber) {
$optionClass = 'text-success';
$icon = '';
$label = 'Marked Correct';
}
@endphp
- {!! $questiondata["option{$optionNumber}"] !!} @if ($icon) {!! $icon !!} {{ $label }} @endif @endforeach
@endforeach