File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,17 +159,21 @@ private function getStudentStatsInternal(
159159 }
160160
161161 $ passesLimit = null ; // null = no limit
162+ $ limit = null ;
162163 if ($ group ->getPointsLimit () !== null && $ group ->getPointsLimit () > 0 ) {
163- $ passesLimit = $ gainedPoints >= $ group ->getPointsLimit ();
164+ $ limit = $ group ->getPointsLimit ();
165+ $ passesLimit = $ gainedPoints >= $ limit ;
164166 } elseif ($ group ->getThreshold () !== null && $ group ->getThreshold () > 0 ) {
165- $ passesLimit = $ gainedPoints >= $ maxPoints * $ group ->getThreshold ();
167+ $ limit = $ maxPoints * $ group ->getThreshold ();
168+ $ passesLimit = $ gainedPoints >= $ limit ;
166169 }
167170 return [
168171 "userId " => $ student ->getId (),
169172 "groupId " => $ group ->getId (),
170173 "points " => [
171174 "total " => $ maxPoints ,
172- "gained " => $ gainedPoints
175+ "limit " => $ limit ,
176+ "gained " => $ gainedPoints ,
173177 ],
174178 "hasLimit " => $ passesLimit !== null ,
175179 "passesLimit " => $ passesLimit ?? true ,
You can’t perform that action at this time.
0 commit comments