@extends('layouts.examiner')
@section('title', 'Questions')
@section('content')
@if(session('success'))
{{ session('success') }}
@endif
{{-- Filter form --}}
@if(!$searched)
Select a session above to view questions.
@elseif($questions->isEmpty())
No questions found for the selected filters.
@else
| S/N |
QUESTION |
CORRECT OPTION |
OPTION 1 |
OPTION 2 |
OPTION 3 |
|
@foreach($questions as $q)
@php
$correct = $q->options->firstWhere('is_right', true);
$wrongs = $q->options->where('is_right', false)->values();
@endphp
| {{ $loop->iteration }} |
{!! $q->question !!} |
{{ optional($correct)->name }} |
{{ optional($wrongs->get(0))->name }} |
{{ optional($wrongs->get(1))->name }} |
{{ optional($wrongs->get(2))->name }} |
|
@endforeach
{{ $questions->withQueryString()->links() }}
@endif
@endsection