@extends('layouts.examiner') @section('title', 'Questions') @section('content')

Questions

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