@extends('layouts.app') @section('title', $app_setting['name'] . ' | Exam Create') @section('content')
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
Edit Exam
@csrf @method('PUT')
@foreach ($exam->questions as $question) @if ($question->question_type == 'multiple_choice')
@php $options = json_decode($question->options); @endphp
option_1->is_correct) checked @endif>
option_2->is_correct) checked @endif>
option_3->is_correct) checked @endif>
option_4->is_correct) checked @endif>
@elseif ($question->question_type == 'single_choice')
@php $options = json_decode($question->options); @endphp
option_1->is_correct) checked @endif>
option_2->is_correct) checked @endif>
option_3->is_correct) checked @endif>
option_4->is_correct) checked @endif>
@elseif ($question->question_type == 'binary')
@php $options = json_decode($question->options); @endphp
yes->is_correct) checked @endif>
no->is_correct) checked @endif>
@endif @endforeach
@endsection @push('scripts') @endpush