/** * @param Array $studentScoreList : class no. * @return Array */ public function countIndividualWeightedScore(&$studentScoreList) { $currentWeightFactory = null; foreach ($studentScoreList as $index => &$row) { $currentWeightFactory = ScoreFactory::getWeightFactory($row['cno']); $row['weightedGrade'] = $currentWeightFactory->countWeightedScore((int) $row['grade']); } return $studentScoreList; }