Progress Review

*

Learner's Name: {{$seniorGradeReport['seniorGradeReport']->student->name}}

Attendance: {{$seniorGradeReport['totalDaysPresent']}} Out Of {{$seniorGradeReport['totalWorkingDays']}}

{{$seniorGradeReport['ageString']}}

Grade: {{$seniorGradeReport['student']->classSection->name}}

Date: {{$seniorGradeReport['currentDate']}}

Term: 1

@php use Illuminate\Support\Str; if (!function_exists('isUrdu')) { function isUrdu($text) { return preg_match('/[\x{0600}-\x{06FF}]/u', $text); } } if (!function_exists('getChunks2')) { function getChunks2($array, $chunkSize) { return array_chunk($array, $chunkSize); } } if (!function_exists('getChunks')) { function getChunks($collection, $chunkSize = 3) { return array_chunk($collection->toArray(), $chunkSize); } } if (!function_exists('getProgressBySubject')) { function getProgressBySubject($progressData, $subjectId) { return collect($progressData)->firstWhere('subject_id', $subjectId); } } $staticTeachersByClassSection = [ 266 => [ 'English Language' => 'Sharaf Un Nisa', 'English Literature' => 'Sharaf Un Nisa', 'Mathematics' => 'Ghausia Zuberi', 'اردو' => 'عمران الرحمان', 'General Science' => 'Sara Abdul Razzaq', 'Geography' => 'Syeda Rafia Zaidi', 'History' => 'Samiullah Saifullah', 'Islamiyat' => 'Saleha Haroon', 'ICT' => 'Mehreen Hakeem', 'Art & Design' => 'Khadija Juzar', 'STEM' => 'Fazal Abbas', 'Physical Development' => 'Binish Rauf', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Life Skills' => 'Farrukh Ayub Patel', 'Homeroom Teacher' => 'Ghausia Zuberi', ], 267 => [ 'English Language' => 'Sharaf Un Nisa', 'English Literature' => 'Sharaf Un Nisa', 'Mathematics' => 'Ghausia Zuberi', 'اردو' => 'عمران الرحمان', 'General Science' => 'Sara Abdul Razzaq', 'Geography' => 'Syeda Rafia Zaidi', 'History' => 'Samiullah Saifullah', 'Islamiyat' => 'Saleha Haroon', 'ICT' => 'Mehreen Hakeem', 'Art & Design' => 'Khadija Juzar', 'STEM' => 'Fazal Abbas', 'Physical Development' => 'Binish Rauf', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Life Skills' => 'Farrukh Ayub Patel', 'Homeroom Teacher' => 'Sharaf Un Nisa', ], 268 => [ 'English Language' => 'Sharaf Un Nisa', 'English Literature' => 'Sharaf Un Nisa', 'Mathematics' => 'Ghausia Zuberi', 'اردو' => 'عمران الرحمان', 'General Science' => 'Nimra Rahim', 'Geography' => 'Syeda Rafia Zaidi', 'History' => 'Samiullah Saifullah', 'Islamiyat' => 'Saleha Haroon', 'ICT' => 'Mehreen Hakeem', 'Art & Design' => 'Khadija Juzar', 'STEM' => 'Fazal Abbas', 'Physical Development' => 'Binish Rauf', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Life Skills' => 'Farrukh Ayub Patel', 'Homeroom Teacher' => 'Mehreen Hakeem', ], 269 => [ 'English Language' => 'Shehla Masood Arif', 'English Literature' => 'Shehla Masood Arif', 'Mathematics' => 'Areeba Ashar Sheikh', 'اردو' => 'رابعہ زوہیب', 'General Science' => 'Naushaba Wajid', 'Geography' => 'Syeda Rafia Zaidi', 'History' => 'Samiullah Saifullah', 'Islamiyat' => 'Saleha Haroon', 'ICT' => 'Osama Shahid', 'Art & Design' => 'Shakirullah Shah', 'STEM' => 'Fazal Abbas', 'Physical Development' => 'Binish Rauf', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Life Skills' => 'Farrukh Ayub Patel', 'Community Service' => 'Sana Sundrani', 'Homeroom Teacher' => 'Areeba Ashar Sheikh', ], 270 => [ 'English Language' => 'Shehla Masood Arif', 'English Literature' => 'Shehla Masood Arif', 'Mathematics' => 'Areeba Ashar Sheikh', 'اردو' => 'رابعہ زوہیب', 'General Science' => 'Naushaba Wajid', 'Geography' => 'Syeda Rafia Zaidi', 'History' => 'Samiullah Saifullah', 'Islamiyat' => 'Saleha Haroon', 'ICT' => 'Osama Shahid', 'Art & Design' => 'Khadija Juzar', 'STEM' => 'Fazal Abbas', 'Physical Development' => 'Binish Rauf', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Life Skills' => 'Farrukh Ayub Patel', 'Community Service' => 'Sana Sundrani', 'Homeroom Teacher' => 'Shehla Masood Arif', ], 271 => [ 'English Language' => 'Sharaf Un Nisa', 'English Literature' => 'Sharaf Un Nisa', 'Mathematics' => 'Nousheen Faisal', 'اردو' => 'رابعہ زوہیب', 'General Science' => 'Naushaba Wajid', 'Geography' => 'Syeda Rafia Zaidi', 'History' => 'Samiullah Saifullah', 'Islamiyat' => 'Saleha Haroon', 'ICT' => 'Osama Shahid', 'Art & Design' => 'Shakirullah Shah', 'Physical Development' => 'Binish Rauf', 'Financial Literacy And Philosophy' => 'Junaid Khan', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Homeroom Teacher' => 'Nousheen Faisal', ], 272 => [ 'English Language' => 'Erum Kohati', 'English Literature' => 'Samiullah Saifullah', 'Mathematics' => 'Areeba Ashar Sheikh', 'اردو' => 'رابعہ زوہیب', 'General Science' => 'Naushaba Wajid', 'Geography' => 'Syeda Rafia Zaidi', 'History' => 'Samiullah Saifullah', 'Islamiyat' => 'Saleha Haroon', 'ICT' => 'Osama Shahid', 'Art & Design' => 'Shakirullah Shah', 'Physical Development' => 'Binish Rauf', 'Financial Literacy And Philosophy' => 'Junaid Khan', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Homeroom Teacher' => 'Naushaba Wajid', ], 273 => [ 'English Language' => 'Erum Kohati', 'English Literature' => 'Erum Kohati', 'Mathematics' => 'Nousheen Faisal', 'اردو' => 'رابعہ زوہیب', 'General Science' => 'Naushaba Wajid', 'HUMAN & PHYSICAL GEOGRAPHY OF PAKISTAN' => 'Syeda Rafia Zaidi', 'HISTORY & CULTURE OF PAKISTAN' => 'Syeda Rafia Zaidi', 'Islamiyat' => 'Mehreen Hakeem', 'ICT' => 'Osama Shahid', 'Art & Design' => 'Shakirullah Shah', 'Physical Development' => 'Binish Rauf', 'Financial Literacy And Philosophy' => 'Junaid Khan', 'Social Emotional Learning' => 'Syeda Sami Un Nisa Nizam', 'Homeroom Teacher' => 'Erum Kohati', ], ]; $subjectChunks = getChunks($seniorGradeReport['classSubjects'], 3); @endphp @foreach($subjectChunks as $chunk)
@foreach($chunk as $subject) @php $classSectionId = $seniorGradeReport['student']->class_section_id ?? null; $staticTeacher = $staticTeachersByClassSection[$classSectionId][$subject['subject_name']] ?? null; $teachers = $subject['teachers'] ?? []; $teachersArray = is_object($teachers) ? $teachers->toArray() : (is_array($teachers) ? $teachers : []); $teachersDisplay = $staticTeacher; @endphp @if($subject['type'] === 'module') {{-- MODULE RENDERING --}}
{{ $subject['subject_name'] }} {{ $teachersDisplay }}

{{ $subject['module_text'] }}

@else {{-- SUBJECT RENDERING --}} @php $progress = getProgressBySubject($seniorGradeReport['progressData'], $subject['subject_id']); $strands = $progress['strands'] ?? []; $marks = $progress['marks'] ?? []; $remarks = $progress['remarks'] ?? null; $isUrduContent = isUrdu($subject['subject_name']) || collect($strands)->pluck('strand')->filter(fn($s) => isUrdu($s))->isNotEmpty() || isUrdu($remarks); @endphp
@if(count($strands) > 0) @for($i = 1; $i <= 4; $i++) @endfor @foreach($strands as $strand) @php $strandText = is_array($strand) ? ($strand['strand'] ?? '') : $strand; @endphp @php $chosenNumber = is_array($strand) ? ($strand['chosen_number'] ?? null) : null; @endphp @for($i = 1; $i <= 4; $i++) @endfor @endforeach @else @endif
{{ $subject['subject_name'] }} {{ $teachersDisplay }} {{ $i }}
{{ $strandText }} @if($chosenNumber === $i) @endif
{{ $subject['subject_name'] }} {{ $teachersDisplay }}
@if(!empty($marks)) @foreach($marks as $mark) @endforeach @php $totalN = 0; $totalD = 0; @endphp @foreach($marks as $mark) @php $n = (int) ($mark['nenominator'] ?? 0); $d = (int) ($mark['denominator'] ?? 0); $totalN += $n; $totalD += $d; @endphp @endforeach
Marks{{ $mark['name'] }}Total
Scored Total{{ $n }} {{ $d }}{{ $totalD > 0 ? number_format(($totalN / $totalD) * 100, 2) : '0.00' }} %
@endif @if(!empty($remarks))

Comments

{{ $remarks }}

@endif
@endif @endforeach @if($loop->last && !empty(trim($seniorGradeReport['commentValue'] ?? '')))

Comments

{{ $seniorGradeReport['commentValue'] }}

@endif @if($loop->last)
*
@endif
@endforeach