@extends('layouts.staff_dashboard') @section('title', 'Allocate Quiz Sets') @section('content') @php use Carbon\Carbon; $today = Carbon::today()->format('Y-m-d'); $currentQuizName = null; // Check if today's date matches the allocated date if ($allocatedate === $today && !empty($allocatedQuizSets)) { $currentQuizName = reset($allocatedQuizSets); // Get first quiz name } @endphp

🎮 Start Live Quiz Session - @if($currentQuizName) {{ $currentQuizName }} @else No quiz allocated for today @endif

@csrf

Allocate Quiz Sets

{{ $courseName ?? 'N/A' }} {{ $moduleName ?? 'N/A' }} {{ $topicName ?? 'N/A' }}
@csrf
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if(!$allocatedate)
Date Required - Please select an allocation date to continue. Quiz sets cannot be allocated without a date.
@endif @if($allocatedate && $isPastDate)
View Only Mode - You are viewing allocations for a past date ({{ $allocatedate }}). Past allocations cannot be modified. To allocate new quiz sets, please select today's date or a future date.
@endif @if($allocatedate)
@if(!$isPastDate) @endif
@csrf
@include('staff.quiz.partials.allocate_quiz_rows', [ 'quizSets' => $quizSets, 'allQuestions' => $allQuestions, 'serialStart' => 1, 'allocatedQuizSets' => $allocatedQuizSets, 'disabledQuizSets' => $disabledQuizSets ?? [] ])
@if($quizSets->hasPages())
@include('staff.pagination.quiz', ['questions' => $quizSets])
@endif
@if($isPastDate) Read-only mode for past dates @else @endif
@else

Select an Allocation Date

Please choose a date from the date picker above to view and allocate quiz sets.

@endif
@endsection