@extends('layouts.app') @section('title', 'Academic Sessions') @section('content')

Academic Sessions

The calendar terms teaching runs in — for example 20262 (Mac–Julai 2026), 20263 (short semester), 20264 (Oktober 2026–Februari 2027).

A session is when teaching happens; a programme semester is where a student is in the syllabus. A student from intake “Mac 2026” sits in Year 1 Semester 2 during session 20262. New assessments are stamped automatically with the session covering their date.
@if($errors->any())
@endif @if($unstamped > 0)
{{ number_format($unstamped) }} assessment(s) carry no academic session — they were recorded before sessions existed, or fall outside every session's dates.
@can('sessions.manage')
@csrf
@endcan
@endif
@forelse($sessions as $session) @php $status = $session->status(); $tone = ['active' => 'success', 'upcoming' => 'info', 'closed' => 'secondary', 'undated' => 'warning'][$status]; $stamped = $assessmentCounts[$session->id] ?? 0; @endphp @can('sessions.manage') @endcan @empty @endforelse
Session Dates Type Status Assessments
{{ $session->code }} @if($session->is_current) Current @endif
{{ $session->name }}
@if($session->starts_on && $session->ends_on) {{ $session->starts_on->format('d M Y') }}
to {{ $session->ends_on->format('d M Y') }}
{{ $session->weeks() }} weeks
@else no dates set @endif
{{ ucfirst($session->type) }} {{ ucfirst($status) }} {{ number_format($stamped) }} @can('sessions.manage') @endcan
@csrf @method('PUT')
is_current)>
@if(($assessmentCounts[$session->id] ?? 0) === 0) {{-- Separate form: a delete needs its own method spoof, which a formaction button on the update form cannot provide. --}}
@csrf @method('DELETE')
@else
Recorded against {{ $assessmentCounts[$session->id] }} assessment(s), so it cannot be deleted.
@endif
No academic sessions defined yet.
@can('sessions.manage')
Add a session
@csrf
UiTM format: year then term, e.g. 20262.
@endcan
Current session
@if($current)
{{ $current->code }} {{ ucfirst($current->type) }}
{{ $current->name }}
@if($current->starts_on && $current->ends_on)
{{ $current->starts_on->format('d M Y') }} – {{ $current->ends_on->format('d M Y') }}
@endif
New assessments are stamped with this session.
@else
No session covers today, and none is flagged as current. New assessments will be recorded without a session.
@endif
@endsection