@extends('backEnd.master') @section('title') @lang('exam.active_exams') @endsection @section('mainContent') @php $route = moduleStatusCheck('OnlineExam')==true ? 'om-take_online_exam' : 'take_online_exam' ; @endphp
@foreach($records as $key => $record)
@if(moduleStatusCheck('University')) @else @endif @foreach($record->OnlineExam as $online_exam) @php @$submitted_answer = $student->studentOnlineExam->where('online_exam_id',$online_exam->id)->first(); @endphp @if(moduleStatusCheck('University')) @else @endif @php $totalDuration = $online_exam->end_time !='NULL' ? Carbon::parse($online_exam->end_time)->diffinminutes( Carbon::parse($online_exam->start_time) ) : 0; @endphp {{-- --}} @endforeach
@lang('exam.title') @lang('university::un.semester_label') (@lang('common.section'))@lang('common.class_Sec')@lang('exam.subject') @lang('exam.exam_date') @lang('exam.duration') @lang('common.status')
{{@$online_exam->title}}{{@$online_exam->unSemesterLabel->name.' ('.@$online_exam->section->section_name.')'}}{{@$online_exam->class->class_name.' ('.@$online_exam->section->section_name.')'}}{{@$online_exam->subject !=""?@$online_exam->subject->subject_name:""}} {{@$online_exam->date != ""? dateConvert(@$online_exam->date):''}}
Time: {{date('h:i A', strtotime(@$online_exam->start_time)).' - '.date('h:i A', strtotime(@$online_exam->end_time))}}
{{ $online_exam->end_time !='NULL' ? gmdate($totalDuration) : 'Unlimited'}} @lang('exam.minutes') {{ $online_exam->total_durations }} @lang('exam.minutes') @php $startTime = strtotime($online_exam->date . ' ' . $online_exam->start_time); $endTime = strtotime($online_exam->date . ' ' . $online_exam->end_time); $now = date('h:i:s'); $now = strtotime("now"); // dump($submitted_answer); @endphp @if( !empty( $submitted_answer)) @if(@$submitted_answer->status == 1) @if($submitted_answer->student_done==1) @lang('exam.already_submitted') @elseif($startTime <= $now && $now <= $endTime) @lang('exam.take_exam') @elseif($startTime >= $now && $now <= $endTime) Waiting @elseif($now >= $endTime) Closed @else @lang('exam.already_submitted') @endif @endif @else @if($startTime <= $now && $now <= $endTime) @lang('exam.take_exam') @elseif($startTime >= $now && $now <= $endTime) @lang('common.waiting') @elseif($now >= $endTime) @lang('common.closed') @endif @endif
@endforeach
@endsection @include('backEnd.partials.data_table_js')