Skip to content

Commit b9d9431

Browse files
DOMjudge teammeisterT
authored andcommitted
Ignore additional bronze medals in public scoreboard until unfreeze
1 parent abf80fa commit b9d9431

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

webapp/src/Service/AwardService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ protected function loadAwards(Contest $contest, Scoreboard $scoreboard): void
5656
$overall_winners = $medal_winners = [];
5757

5858
$additionalBronzeMedals = $contest->getB() ?? 0;
59+
// Do not consider additional bronze medals until the contest is unfrozen.
60+
if (!$scoreboard->isRestricted()) {
61+
$additionalBronzeMedals = 0;
62+
}
5963

6064
$currentSortOrder = -1;
6165

webapp/src/Utils/Scoreboard/Scoreboard.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ public function __construct(
4848
$this->calculateScoreboard();
4949
}
5050

51+
/**
52+
* @return bool Whether this Scoreboard has restricted access (either a jury member can see, or after unfreeze).
53+
*/
54+
public function isRestricted(): bool
55+
{
56+
return $this->restricted;
57+
}
58+
5159
/**
5260
* @return Team[]
5361
*/

0 commit comments

Comments
 (0)