@extends('layouts.staff_dashboard') @section('title', 'Allocate MCQ Assessment Questions') @section('content') @php $formatTime12 = function ($time) { if (!$time) return ''; try { return \Carbon\Carbon::parse($time)->format('h:i A'); } catch (\Throwable $e) { return $time; } }; $displayStart = $formatTime12($assstarttime ?? ''); $displayEnd = $formatTime12($assendtime ?? ''); $displayDate = !empty($assdate) ? \Carbon\Carbon::parse($assdate)->format('M d, Y') : ''; @endphp
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

{{ $assname ?? 'Allocate MCQ Questions' }}

{{ $course_name ?? 'Course' }} {{ $module_name ?? 'Module' }} @if($displayDate) {{ $displayDate }} @endif @if($displayStart && $displayEnd) {{ $displayStart }} – {{ $displayEnd }} @endif
@csrf
{{ count($allocatedQuestionIds ?? []) }} Selected
@include('staff.mcqassesment.partials.allocate_rows', [ 'questions' => $questions, 'allocatedQuestionIds' => $allocatedQuestionIds ?? [], 'serialStart' => 1, ])
@if($questions->hasPages()) {{ $questions->links('staff.pagination.mcqassesment') }} @endif
@endsection