@extends('admin.layouts.main') @section('content')

{{ trans('messages.Exam') }} ( {{ $exam->{'name_' . App::getLocale()} }} ) @can('exam_edit') @endcan

{{ trans('messages.Packages') }} {{ trans('messages.Questions') }} {{ trans('messages.Attempt No') }} {{ trans('messages.Duration') }}
@forelse ($exam->packages as $package)
{{ $package->{'name_' . App::getLocale()} }}
@empty @endforelse
{{ $exam->questions_num }} {{ $exam->attempt_num }} {{ $exam->duration_in_minutes }} {{ trans('messages.Minutes') }}




@if (sizeof($exam->examCategory) > 0)

{{ trans('messages.You can add new exam category from here') }}

@endif @forelse ($exam->examCategory as $category)

{{ $category->{'name_' . App::getLocale()} }} @can('exam_category_edit') @endcan


@if (sizeof($category->questions) > 0)

{{ trans('messages.You can add new question from here') }}

@endif @forelse ($category->questions as $key => $question) @if ($question->question_type == 'mcq' || $question->question_type == 'text_input')

- {{ $question->{'question_' . App::getLocale()} }} @can('question_update') @endcan

@if (sizeof($question->answers) > 0)

{{ trans('messages.You can add new answer from here') }}

@endif @forelse ($question->answers as $key2 => $answer)
- {{ $answer->{'answer_' . App::getLocale()} }}
@empty

{{ trans('messages.There is no answers in this question you can add one from here') }}

@endforelse
@if(!empty($question->question_image) && file_exists(public_path().'/'.$question->question_image)) @if(in_array(pathinfo($question->question_image, PATHINFO_EXTENSION),["jpg","jpeg","gif","png","bmp","JPG"])) your question_image @else @endif @else your question_image @endif
@elseif($question->question_type == 'drag_drop')

- {{ $question->{'question_' . App::getLocale()} }} @can('question_update') @endcan

@if (sizeof($question->answers) > 0)

{{ trans('messages.You can add new answer from here') }}

@endif @forelse ($question->answers as $key2 => $answer)
- {{ $answer->{'answer_' . App::getLocale()} }}
@empty

{{ trans('messages.There is no answers in this question you can add one from here') }}

@endforelse
@forelse ($question->answers as $key2 => $answer)
{{ $answer->{'answer_' . App::getLocale()} }}
@empty @endforelse @if(!empty($question->question_image) && file_exists(public_path().'/'.$question->question_image)) @if(in_array(pathinfo($question->question_image, PATHINFO_EXTENSION),["jpg","jpeg","gif","png","bmp","JPG"])) your question_image @else @endif @else your question_image @endif
@elseif($question->question_type == 'mcq_image')

- {{ $question->{'question_' . App::getLocale()} }} @can('question_update') @endcan

@if (sizeof($question->answers) > 0)

{{ trans('messages.You can add new answer from here') }}

@endif
@forelse ($question->answers as $key2 => $answer) @empty

{{ trans('messages.There is no answers in this question you can add one from here') }}

@endforelse
@endif @empty

{{ trans('messages.There is no questions in this category you can add one from here') }}

@endforelse

{{ trans('messages.You can add new question from here') }}

@empty

{{ trans('messages.There is no categories in this exam you can add one from here') }}

@endforelse
@endsection @section('modal') @endsection @section('script') @endsection