@foreach ($exams as $exam) | {{$exam->name}} ({{$exam->totalAttainableMarksInASubject}}) | @endforeachTotal ({{$exams->pluck('totalAttainableMarksInASubject')->sum()}}) | Grade | Remark | @foreach ($subjects as $subject)
---|---|---|---|---|
{{$subject->name}} | @foreach ($exams as $exam){{$examRecords->whereIn('exam_slot_id', $exam->examSlots?->pluck('id'))->where('subject_id' , $subject->id)->pluck('student_marks')->sum()}} | @endforeach{{$examRecords->where('subject_id' , $subject->id)->pluck('student_marks')->sum()}} | @php $grade = app(App\Services\GradeSystem\GradeSystemService::class)->getGrade($selectedClass->classGroup->id, ( $examRecords->where('subject_id' , $subject->id)->pluck('student_marks')->sum()/$exams->pluck('totalAttainableMarksInASubject')->sum()) * 100) @endphp{{$grade->name ?? 'No Grade'}} | {{$grade->remark ?? 'No Remark'}} |
Subject | @foreach ($exam->examSlots as $examSlot){{$examSlot->name}} ({{$examSlot->total_marks}}) | @endforeachTotal ({{$exam->examSlots->pluck('total_marks')->sum()}}) |
---|---|---|
{{$subject->name}} | @foreach ($exam->examSlots as $examSlot){{$examRecords->where('subject_id' , $subject->id)->where('exam_slot_id' , $examSlot->id)->first()->student_marks ?? "No record"}} | @endforeach{{$examRecords->where('subject_id' , $subject->id)->whereIn('exam_slot_id', $exam->examSlots->pluck('id'))->sum('student_marks')}} |
Total marks obtained: {{$examRecords->whereIn('exam_slot_id', $exam->examSlots->pluck('id'))->sum('student_marks')}} / {{$exam->examSlots->pluck('total_marks')->sum() * $subjects->count()}}
@endif @endforeach{{$status}}
@endif