@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $components = $leafComponents ?? collect(); @endphp
@if($components->isNotEmpty())

Mark structure for this class/subject: @foreach($distribution->components as $topLevel) @if($topLevel->children->isNotEmpty()) {{ $topLevel->name }}: {{ $topLevel->max_marks }} ({{ $topLevel->children->pluck('name')->join(', ') }}) @else {{ $topLevel->name }}: {{ $topLevel->max_marks }} @endif @endforeach

@if($components->contains(fn ($c) => $c->isAutoSourced()))

Components marked Auto are pre-filled from existing attendance/homework/assignment records and can still be adjusted before saving.

@endif @endif
@csrf
@if($components->isEmpty()) @else @foreach($components as $component) @endforeach @endif @forelse($registrations as $registration) @php $entry = $entries->get($registration->student_id); $entryComponents = $entry?->components->keyBy('mark_distribution_component_id') ?? collect(); $prefills = $components->mapWithKeys(fn ($component) => [ $component->id => $entryComponents->get($component->id)?->marks_obtained ?? $suggested->get("{$registration->student_id}.{$component->id}"), ]); @endphp @if($components->isEmpty()) @else @foreach($components as $component) @endforeach @endif @empty @endforelse
# StudentMarks Obtained {{ $component->name }} (max {{ $component->max_marks }}) @if($component->pass_marks !== null) (pass {{ $component->pass_marks }}) @endif @if($component->isAutoSourced()) @endif Total (max {{ $schedule->full_marks }}) (pass {{ $schedule->pass_marks }})Absent Moderated Status
{{ $loop->iteration }} {{ $registration->student->fullName() }} {{-- readonly (not disabled) on purpose: a disabled input is excluded from form submission entirely, which would drop this student out of the request when marked absent and they have no existing mark entry — so the absence itself would silently fail to save. readonly still greys out and blocks typing, but keeps the field (now emptied) submitted. --}}

Max {{ $component->max_marks }}

— {{ $entry?->moderated_marks ?? '—' }} {{ ucfirst($entry?->status ?? 'pending') }} @if($entry) @endif
No students registered for this sitting.
@if($components->isNotEmpty())

Each component is capped at its configured maximum; the total is summed automatically.

@endif

Moderate mark for

@csrf @method('PATCH')