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

Cohorts

Move students between semesters and manage the intake list.

@if($errors->any())
@endif {{-- ── Where everyone is ──────────────────────────────────────────────── --}}
Current distribution
@php $max = max(1, $distribution->max() ?: 1); @endphp @foreach($semesters as $sem) @php $n = $distribution->get($sem->id, 0); @endphp
{{ $sem->name }}
{{ $n }}
@endforeach @if($unassigned > 0)
No semester set
{{ $unassigned }}
These students are excluded from every progress figure until a semester is set. Use “Set to a specific semester” below, or edit them individually.
@endif
{{-- ── Advance ────────────────────────────────────────────────────── --}}
Advance to next semester

Moves each student forward by one semester, in syllabus order. Students already in the final semester are left alone.

@if($preview)
What will happen
@forelse($preview['moves'] as $move)
{{ $move['count'] }} {{ $move['from']->name }} {{ $move['to']->name }}
@empty
No student in this selection can move forward.
@endforelse @foreach($preview['final'] as $stuck)
{{ $stuck['count'] }} {{ $stuck['semester']->name }} — final semester, will not move
@endforeach @if($preview['none'] > 0)
{{ $preview['none'] }} student(s) have no semester set and will be skipped.
@endif
@if($preview['movable']->isNotEmpty())
@csrf
@endif @else
Choose an intake and press Preview to see exactly who would move.
@endif
{{-- ── Absolute set ───────────────────────────────────────────── --}}
Set to a specific semester

Places a group directly in one semester. Use this for a freshly imported cohort or to correct a mistake.

@csrf
{{-- ── Intakes ────────────────────────────────────────────────────── --}}
Intakes

Students pick their intake from this list, so cohorts stay groupable. Renaming one updates every student who has it.

@can('intakes.manage')
@csrf
@endcan
    @forelse($intakes as $intake) @php $count = \App\Models\StudentProfile::where('intake', $intake->name)->count(); @endphp
  • @can('intakes.manage')
    @csrf @method('PUT')
    is_active)>
    {{ $count }}
    @if($count === 0)
    @csrf @method('DELETE')
    @endif @else
    {{ $intake->name }} {{ $count }}
    @endcan
  • @empty
  • No intakes defined yet.
  • @endforelse
@endsection