{{-- Extends layout --}} @extends(getThemeBasePath()) @section('page_title') {{ $page_title }} @endsection {{-- Content --}} @section('content')
{!! Helper::getListAddBtn(route('training_category_staff.index'), 'Back', 'back') !!}
@include('backend.alerts')
@foreach ($moduleArray as $moduleData)
@if (!empty($moduleFiles[$moduleData->id])) @php $filePath = 'module_files/' . $moduleData->id . '/'; $file = $moduleFiles[$moduleData->id]; $allowed_types = ['application/pdf', 'image/jpeg', 'image/png']; $fileInfo = finfo_open(FILEINFO_MIME_TYPE); $detected_type = pathinfo(asset('images/module/' . $file['name'])); @endphp @if (in_array(strtolower($detected_type['extension']), ['jpg', 'jpeg', 'gif', 'png'])) @elseif(strtolower($detected_type['extension']) == 'pdf')
@push('custom-scripts') @endpush @elseif(strtolower($detected_type['extension']) == 'mp4') @else
No Preview Available
@endif @else
No Preview
@endif

Training Name
@if (!empty($$moduleData->link)){{ $moduleData->subject??'' }} @else {{$moduleData->subject??''}} @endif
Status
{{ ucwords($moduleData->tstatus??'') }}
Deadline
{{ date('d-m-Y', strtotime($moduleData->deadline_date??'')) }}
Time Left
@if (!empty($moduleData->deadline_date)) @php $earlier = new DateTime(date('Y-m-d')); $later = new DateTime($moduleData->deadline_date); $diff = $later->diff($earlier)->format('%a'); @endphp {{ $moduleData->deadline_date >= date('Y-m-d') ? $diff . ' Days' : 'Expired' }} @endif
Test Status
tresult) && strtolower($moduleData->tresult) == 'fail') style="color:red;" @endif> {{ $moduleData->tresult }}
Answer Sheet
@if ( !empty($moduleData->tresult) && in_array(strtolower($moduleData->tresult),['pass','fail'])) Answer sheet @else Pending @endif
Certificate
@if ($moduleData->tresult == 'Pass') @if ($moduleData->module_certificate == 1) Get Certificate @else Get Certificate @endif @else Certification Pending @endif
Description
{{ $moduleData->description??'' }}
@if ($moduleData->training_attempted >= 1 && strtolower($moduleData->tresult) != 'pass') @endif
@endforeach
{!! $html->table() !!}
@endsection {{-- Scripts Section --}} @section('scripts') {!! $html->scripts() !!} @endsection