@extends('backend.master') @section('title') {{ @$data['title'] }} @endsection @section('content')
{{-- bradecrumb Area S t a r t --}} {{-- bradecrumb Area E n d --}}

{{ setting('application_name') }}

{{ setting('address') }}

@if (@$data['exam']->type)
{{___('student_info.Exam Type')}} :
{{ @$data['exam']->type->name }}
@endif
{{___('report.Exam Name')}} :
{{ @$data['exam']->name }}
@if (@$data['exam']->subject)
{{ ___('online-examination.Subject') }} :
{{ @$data['exam']->subject->name }}, {{ ___('online-examination.Code') }}: {{ @$data['exam']->subject->code }}
@endif
{{ ___('online-examination.Mark') }} :
{{@$data['exam']->total_mark}}
{{ @$data['title'] }}
@php $answers = @$data['answer']->allAnswers->pluck('question_bank_id')->toArray(); @endphp
@csrf @foreach (@$data['exam']->examQuestions as $key=>$item)
{{ ++$key }}. {{ @$item->question->question }}
@php $evaluationMark = optional(@$data['answer']->allAnswers->where('question_bank_id', @$item->question->id)->first())->evaluation_mark; $isChecked = $evaluationMark !== null && $evaluationMark !== 0; $key--; @endphp @if (in_array(@$item->question->id, $answers)) @endif
{{ @$item->question->mark }}
@if (@$item->question->type == 1) @for($i = 0; $i < @$item->question->total_option; $i++) {{++$i}}. {{@$item->question->questionOptions[--$i]->option}}
@endfor @if (in_array(@$item->question->id, $answers)) {{ ___('online-examination.Answer') }}: {{ $data['answer']->allAnswers->where('question_bank_id', @$item->question->id)->first()->answer }}. @endif
{{ ___('online-examination.Correct Answer') }}: {{@$item->question->answer}}. @elseif (@$item->question->type == 2) @for($i = 0; $i < @$item->question->total_option; $i++) {{++$i}}. {{@$item->question->questionOptions[--$i]->option}}
@endfor @if (in_array(@$item->question->id, $answers)) {{ ___('online-examination.Answer') }}: @foreach ($data['answer']->allAnswers->where('question_bank_id', @$item->question->id)->first()->answer as $ans) {{$ans}}. @endforeach @endif
{{ ___('online-examination.Correct Answer') }}: @foreach (@$item->question->answer as $ans) {{$ans}}. @endforeach @elseif(@$item->question->type == 3) {{ ___('online-examination.1') }} {{ ___('online-examination.True') }}
{{ ___('online-examination.2') }} {{ ___('online-examination.False') }}
@if (in_array(@$item->question->id, $answers)) {{ ___('online-examination.Answer') }}: @if ((int)$data['answer']->allAnswers->where('question_bank_id', @$item->question->id)->first()->answer == 1) {{ ___('online-examination.1') }} @else {{ ___('online-examination.2') }} @endif @endif
{{ ___('online-examination.Correct Answer') }}: {{@$item->question->answer}} @else @if (in_array(@$item->question->id, $answers)) {{ ___('online-examination.Answer') }}: {{ $data['answer']->allAnswers->where('question_bank_id', @$item->question->id)->first()->answer}} @endif @endif @endforeach
@endsection