@extends($layout_path) @section('title', $app_setting['name'] . ' | ' . __('Quiz Edit')) @section('header-title')

{{ __('Update Quiz') }}

@endsection @push('styles') @endpush @section('content')
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @method('PUT')

@foreach ($quiz->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 == '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