@extends('backEnd.master') @section('title') @lang('exam.question_bank') @endsection @push('css') @endpush @section('mainContent')
@if (isset($bank)) @if (userPermission('question-bank-store')) @endif @endif

@if (isset($bank)) @lang('exam.edit_question_bank') @else @lang('exam.add_question_bank') @endif

@if (isset($bank)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => ['question-bank-update', $bank->id], 'method' => 'PUT', 'enctype' => 'multipart/form-data', 'id' => 'question_bank']) }} @else @if (userPermission('question-bank-store')) {{ Form::open([ 'class' => 'form-horizontal', 'files' => true, 'route' => 'question-bank-store', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'id' => 'question_bank', ]) }} @endif @endif
@if ($errors->has('group')) {{ $errors->first('group') }} @endif
@if(moduleStatusCheck('University')) @if(isset($editData)) @includeIf('university::common.session_faculty_depart_academic_semester_level', [ 'required' => ['USN', 'UD', 'UA', 'US', 'USL','USEC'], 'hide'=>['USUB'], 'div'=>'col-lg-12','row'=>1,'mt'=>'mt-0' ,'subject'=>false, ]) @else @includeIf('university::common.session_faculty_depart_academic_semester_level', [ 'required' => ['USN', 'UD', 'UA', 'US', 'USL','USEC'], 'hide'=>['USUB'], 'div'=>'col-lg-12','row'=>1,'mt'=>'mt-0' ,'subject'=>false, 'multipleSelect' => 1, ]) @endif @else
@if ($errors->has('class')) {{ $errors->first('class') }} @endif
@if (!isset($bank))
@if ($errors->has('section')) {{ $errors->first('section') }} @endif
@else
loader
@if ($errors->has('section')) {{ $errors->first('section') }} @endif
@endif
@endif
{{--
@if ($errors->has('group')) {{ $errors->first('group') }} @endif
--}}
@if ($errors->has('group')) {{ $errors->first('group') }} @endif
@if ($errors->has('question')) {{ $errors->first('question') }} @endif
@if ($errors->has('marks')) {{ $errors->first('marks') }} @endif
@php if (!isset($bank)) { if (old('question_type') == 'M') { $multiple_choice = ''; } } else { if ($bank->type == 'M' || old('question_type') == 'M') { $multiple_choice = ''; } } @endphp
@if ($errors->has('number_of_option')) {{ $errors->first('number_of_option') }} @endif
@php if (!isset($bank)) { if (old('question_type') == 'M') { $multiple_options = ''; } } else { if ($bank->type == 'M' || old('question_type') == 'M') { $multiple_options = ''; } } @endphp
@php $i = 0; $multiple_options = []; if (isset($bank)) { if ($bank->type == 'M') { $multiple_options = $bank->questionMu; } } @endphp @foreach ($multiple_options as $multiple_option) @php $i++; @endphp
status == 1) checked @endif>
@endforeach
@php if (!isset($bank)) { if (old('question_type') == 'T') { $true_false = ''; } } else { if ($bank->type == 'T' || old('question_type') == 'T') { $true_false = ''; } } @endphp

trueFalse == 'T' ? 'checked' : '') : 'checked' }}>
trueFalse == 'F' ? 'checked' : '') : '' }}>
@php if (!isset($bank)) { if (old('question_type') == 'F') { $fill_in = ''; } } else { if ($bank->type == 'F' || old('question_type') == 'F') { $fill_in = ''; } } @endphp
@if ($errors->has('suitable_words')) {{ $errors->first('suitable_words') }} @endif
{{-- Start Multiple Images Question --}} @php if (!isset($bank)) { if (old('question_type') == 'MI') { $multiple_image = ''; } } else { if ($bank->type == 'MI' || old('question_type') == 'MI') { $multiple_image = ''; } } @endphp
@if ($errors->has('answer_type')) {{ $errors->first('answer_type') }} @endif
@if ($errors->has('question_image')) {{ $errors->first('question_image') }} @endif
{{-- (jpg,png,jpeg,pdf,doc,docx,mp4,mp3 are allowed for upload) --}}
@if ($errors->has('number_of_option')) {{ $errors->first('number_of_option') }} @endif
@php $i = 0; $multiple_options = []; if (isset($bank)) { if ($bank->type == 'MI') { $multiple_options = $bank->questionMu; } } @endphp @foreach ($multiple_options as $multiple_option) @php $i++; @endphp
{{-- --}}
status == 1 ? 'checked' : '' }} name="option_check_{{ $i }}" value="1">
@endforeach
{{-- End Multiple Images Question --}} {{ Form::close() }} @php $tooltip = ''; if (userPermission('question-bank-store') || userPermission('question-bank-edit')) { $tooltip = ''; } else { $tooltip = 'You have no permission to add'; } @endphp
{{-- --}}

@lang('exam.question_bank_list')

@if(moduleStatusCheck('University')) @else @endif @foreach ($banks as $bank) @if(moduleStatusCheck('University')) @else @endif @endforeach
@lang('exam.group') @lang('university::un.semester_label') (@lang('common.section'))@lang('common.class_Sec')@lang('exam.question') @lang('common.type') @lang('common.action')
{{ $bank->questionGroup != '' ? $bank->questionGroup->title : '' }}{{ $bank->unSemesterLabel != '' ? $bank->unSemesterLabel->name : '' }} ({{ $bank->section != '' ? $bank->section->section_name : '' }}){{ $bank->class != '' ? $bank->class->class_name : '' }} ({{ $bank->section != '' ? $bank->section->section_name : '' }}){{ $bank->question }} @if ($bank->type == 'M') {{ 'Multiple Choice' }} @elseif($bank->type == 'T') {{ 'True False' }} @elseif($bank->type == 'MI') {{ 'Multiple Image Choice' }} @else {{ 'Fill in the blank' }} @endif @if (userPermission('question-bank-edit')) @lang('common.edit') @endif @if (userPermission('question-bank-delete')) @lang('common.delete') @endif
@endsection @include('backEnd.partials.multi_select_js') @section('script') @endsection @include('backEnd.partials.data_table_js')