@extends('layouts.teacher') {{ config('app.name', 'Laravel') }} | Teacher | Exam @section('main-content')
@if(Session::has('success')) @endif @if(Session::has('error')) @endif

Records / Exam Details

@if($examQuestions->isNotEmpty()) @foreach($examQuestions as $question)
Q{{ $loop->iteration }}. {{ $question->question_text }}
    • a) {{ $question->question_option1 }}
    • b) {{ $question->question_option2 }}
    • c) {{ $question->question_option3 }}
    • d) {{ $question->question_option4 }}

Marks Schema
Correct Answer: +{{$question->question_marks}}
Wrong Answer: -

Chosen Correct Option:

@foreach(['a', 'b', 'c', 'd'] as $optionLabel) @php $optionKey = 'question_option' . $loop->iteration; @endphp @if($question->correct_answer === $optionKey) {{ $optionLabel }}) @endif @endforeach @foreach(['a', 'b', 'c', 'd'] as $optionLabel) @php $optionKey = 'question_option' . $loop->iteration; @endphp @if($question->correct_answer === $optionKey) {{ $question->$optionKey }} @endif @endforeach

@endforeach @else

No questions available for this exam.

@endif
@endsection {{-- --}}