Skip to content

Commit 7d4119d

Browse files
committed
Fix single team scoreboard.
Points and time have been calculated already in https://github.com/DOMjudge/domjudge/blob/6613b28ba7eebfdb300222361252d2e731399c99/webapp/src/Utils/Scoreboard/TeamScore.php#L21 There is no need to recalculate it (which would double it).
1 parent 272ee42 commit 7d4119d

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

webapp/src/Utils/Scoreboard/SingleTeamScoreboard.php

-10
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,7 @@ public function __construct(
4141

4242
protected function calculateScoreboard(): void
4343
{
44-
$rankCacheForTeam = null;
45-
if ($this->rankCache !== null && count($this->rankCache) > 0) {
46-
$rankCacheForTeam = $this->rankCache[0];
47-
}
48-
4944
$teamScore = $this->scores[$this->team->getTeamid()];
50-
if ($rankCacheForTeam !== null) {
51-
$teamScore->numPoints += $rankCacheForTeam->getPointsRestricted();
52-
$teamScore->totalTime += $rankCacheForTeam->getTotaltimeRestricted();
53-
$teamScore->totalRuntime += $rankCacheForTeam->getTotalruntimeRestricted();
54-
}
5545
$teamScore->rank = $this->teamRank;
5646

5747
// Loop all info the scoreboard cache and put it in our own data structure.

0 commit comments

Comments
 (0)