My CBT Tests
@if(!request()->filled('class_id'))
Select a class to view CBT tests.
@elseif($cbtTests->isEmpty())
No CBT test available for this class yet.
@endif
@if($cbtTests->isNotEmpty())
@if(session('success'))
{{ session('success') }}
@endif
| S/N |
Class |
Subject |
Instruction |
Term |
Session |
Duration(min) |
Total Questions |
Type |
Action |
@foreach($cbtTests as $key => $test)
@php
$minutes = $test->duration_minutes;
$hours = floor($minutes / 60);
$remainingMinutes = $minutes % 60;
if ($hours > 0 && $remainingMinutes > 0) {
$formattedDuration = $hours . 'hr ' . $remainingMinutes . 'mins';
} elseif ($hours > 0) {
$formattedDuration = $hours . 'hr';
} else {
$formattedDuration = $remainingMinutes . 'mins';
}
@endphp
| {{$key + 1}} |
{{$test->class->class_name}} |
{{$test->subject->subject_name}} |
{{$test->title}} |
{{$test->term}} |
{{$test->session}} |
{{ $formattedDuration }} |
{{ $test->questions->count() }} |
{{$test->assessment_type}} |
|
@endforeach
@endif