From 13be37d55f9ed897aa8c4b9ca6e399ca9f96ee15 Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Tue, 22 Apr 2025 20:50:38 +0200 Subject: [PATCH] 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). --- webapp/src/Utils/Scoreboard/SingleTeamScoreboard.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/webapp/src/Utils/Scoreboard/SingleTeamScoreboard.php b/webapp/src/Utils/Scoreboard/SingleTeamScoreboard.php index 4a8bc76ab4..9acae1c400 100644 --- a/webapp/src/Utils/Scoreboard/SingleTeamScoreboard.php +++ b/webapp/src/Utils/Scoreboard/SingleTeamScoreboard.php @@ -41,17 +41,7 @@ public function __construct( protected function calculateScoreboard(): void { - $rankCacheForTeam = null; - if ($this->rankCache !== null && count($this->rankCache) > 0) { - $rankCacheForTeam = $this->rankCache[0]; - } - $teamScore = $this->scores[$this->team->getTeamid()]; - if ($rankCacheForTeam !== null) { - $teamScore->numPoints += $rankCacheForTeam->getPointsRestricted(); - $teamScore->totalTime += $rankCacheForTeam->getTotaltimeRestricted(); - $teamScore->totalRuntime += $rankCacheForTeam->getTotalruntimeRestricted(); - } $teamScore->rank = $this->teamRank; // Loop all info the scoreboard cache and put it in our own data structure.