@extends('admin.admin_dashboard') @section('customcss') @endsection @section('admin')

Marks Entry — {{ $exam->exam_name }} — Subject: {{ optional($components->first())->subject->name ?? 'Subject' }}

@if($isLocked)
This marks sheet is locked (submitted at {{ optional($submission)->created_at }}). Editing blocked.
@endif
@csrf @foreach($components as $comp) @endforeach @foreach($students as $stu) @foreach($components as $comp) @php $key = $stu->id . '_' . $comp->id; $existingKey = $stu->id . '_' . $comp->id; $existingMark = null; foreach($existing as $k => $v) { // grouped by student_component earlier - adapt if necessary } @endphp @php $existingRecord = \App\Models\ExamComponentMark::where('exam_id',$exam->id) ->where('student_id',$stu->id) ->where('component_id',$comp->id) ->first(); $obtained = $existingRecord ? $existingRecord->obtained_mark : ''; $is_abs = $existingRecord ? $existingRecord->is_absent : 0; $remarks = $existingRecord ? $existingRecord->remarks : ''; @endphp @endforeach @endforeach
Roll Student {{ $comp->component_name }}
Full: {{ $comp->full_mark }}
Remarks
{{ $stu->roll }} {{ $stu->name }}
@endsection @section('customjs') @endsection