বাংলাদেশ ও বিশ্বপরিচয় branch_id : "1826391781401364" class_id : "1826392935994926" exam_category_id : "1833793918391908" section_id : "1826458454964325" subject_id : "1826729554953615" বাংলা ১ম পত্র branch_id: "1826391781401364" class_id: "1826392935994926" exam_category_id: "1833793918367918" section_id: "1826458454964325" subject_id: "1826727720689240" বাংলা ২য় পত্র branch_id: "1826391781401364" class_id: "1826392935994926" exam_category_id: "1833793918370749" section_id: "1826458454964325" subject_id: "1826727868633875" ইংরেজি ১ম পত্র branch_id: "1826391781401364" class_id: "1826392935994926" exam_category_id: "1833793918372772" section_id: "1826458454964325" subject_id: "1826727973609220" ইংরেজি ২য় পত্র branch_id: "1826391781401364" class_id: "1826392935994926" exam_category_id: "1833793918374966" section_id: "1826458454964325" subject_id: "1826728021357184" ইসলাম ও নৈতিক শিক্ষা branch_id: "1826391781401364" class_id: "1826392935994926" exam_category_id: "1833793918378863" section_id: "1826458454964325" subject_id: "1826728173808559" বাংলাদেশ ও বিশ্বপরিচয় branch_id: "1826391781401364" class_id: "1826392935994926" exam_category_id: "1833793918391908" section_id: "1826458454964325" subject_id: "1826729554953615" // $getAllResult = Result::get(); // foreach($getAllResult as $result){ // $exam_type = $this->examConfigureService->getById($result->exam_category_id); // $markDistribution = MarkDistribution::where('exam_id', $result->exam_category_id)->where('student_id', $result->student_id)->first(); // $resultStatus = $markDistribution ? ($markDistribution->status == 1 ? ((($result->full_mark * 100)/ $exam_type->exam_full_mark) >= 33 ? 'Pass' : 'Fail') : 'Absent') : 'Absent'; // $result->update([ // 'result_status' => $resultStatus, // 'grad_point' => $resultStatus == 'Pass' ? $this->gradPointConvert(($result->full_mark * 100)/ $exam_type->exam_full_mark)['point'] : 0.00, // 'grade' => $resultStatus != 'Absent' ? ($resultStatus == 'Pass' ? $this->gradPointConvert(($result->full_mark * 100)/ $exam_type->exam_full_mark)['grade'] : 'F') : 'Absent', // 'is_present' => $markDistribution ? $markDistribution->status : 'Absent', // ]); // } // return $getAllResult; // $getAllResult = Result::get(); // $sectionWise = $getAllResult->groupBy('section_id'); // foreach($sectionWise as $sectionResult){ // $subjectWise = $sectionResult->groupBy('subject_id'); // foreach($subjectWise as $subjectResult){ // $highest_mark = $subjectResult->max('full_mark'); // foreach($subjectResult as $result){ // $result->update([ // 'highest_mark' => $highest_mark // ]); // } // } // } // return $getAllResult;