@extends('layout.layout') @section('content')
| Id | Name | Due Date | Teacher | Admin | Result | Submitted Date | Actions | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $exam->id }} | {{ $exam->title }}({{ count($exam->questions) }} Questions) |
@php
$schedule = $exam->schedules->first();
$startDateTime = null;
if ($schedule && $schedule->start_date && $schedule->start_time) {
$dateOnly = \Carbon\Carbon::parse($schedule->start_date)->format('Y-m-d');
$startDateTime = \Carbon\Carbon::parse($dateOnly . ' ' . $schedule->start_time);
}
@endphp
From: {{ $schedule->start_date ?? '' }} -
{{ $schedule->start_time ?? '' }}
@if ($startDateTime && $exam->is_upcoming) {{-- Countdown Timer --}}
Loading...
@endif @if ($schedule->schedule_type == 'fixed')
Grace Period: {{ $schedule->grace_period ?? '' }} min
@elseif ($schedule->schedule_type == 'flexible')
To: {{ $schedule->end_date ?? '' }} -
{{ $schedule->end_time ?? ''}}
@endif
|
{{ $exam->schedules->first()->staffScheduled->staff->first_name ?? '' }} {{ $exam->schedules->first()->staffScheduled->staff->last_name ?? '' }} | @foreach($exam->schedules->first()->staffScheduled->admin_assigned_students as $admin) {{ $admin->admin->full_name ?? '' }} , @endforeach | @php $submission = $exam->examSubmissions; @endphp @if ($exam->examSubmissions) @if ($submission->passed) Pass @else Fail @endif @else No Result @endif | {{-- @dd($exam->attempts) --}} {{-- @dd($exam->has_submission,$exam->attempts,$exam->is_expired) --}} @if ($exam->has_submission){{ $exam->examSubmissions->submitted_at }} | Feedback | @elseif ($exam->is_upcoming)Not Started Yet | Not Started Yet | @elseif ($exam->attempts->isNotEmpty() && $exam->attempts->first()->status === 'in_progress')Already Started | Already Started | @elseif ($exam->is_expired)Expired | Expired | @elseif (!$exam->can_start_now)- | Start Exam | @elseStart Exam | Start Exam | @endif
| No exams found. | |||||||||||||||||