aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-09 15:38:05 +0900
committernsfisis <nsfisis@gmail.com>2024-03-09 15:38:10 +0900
commit6ef7b6b2d4390984d5fbf07c297c87758a8547a8 (patch)
tree25e28ab281ec9a92cf9d1ead4d42510b858753d8
parentac5fd153e36f3cceb96ffd9e7af9ca967d9b9215 (diff)
downloadphperkaigi-2024-albatross-6ef7b6b2d4390984d5fbf07c297c87758a8547a8.tar.gz
phperkaigi-2024-albatross-6ef7b6b2d4390984d5fbf07c297c87758a8547a8.tar.zst
phperkaigi-2024-albatross-6ef7b6b2d4390984d5fbf07c297c87758a8547a8.zip
separate the time when ranking is shown again and the time when the quiz is finished
-rw-r--r--services/app/src/Models/Quiz.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/app/src/Models/Quiz.php b/services/app/src/Models/Quiz.php
index 5546646..5e2cda6 100644
--- a/services/app/src/Models/Quiz.php
+++ b/services/app/src/Models/Quiz.php
@@ -55,7 +55,8 @@ final class Quiz
if ($now === null) {
$now = new DateTimeImmutable('now', new DateTimeZone('UTC'));
}
- return $this->ranking_hidden_at <= $now && !$this->isFinished($now);
+ $rankingShownAgainAt = $this->finished_at->modify('+90 minutes');
+ return $this->ranking_hidden_at <= $now && $now < $rankingShownAgainAt;
}
public static function create(