diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-06 21:37:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-06 21:37:56 +0900 |
| commit | c19c84cd11380901c3f8ea60fa0319cca8d7b7d3 (patch) | |
| tree | b5f804c9e2dca05d098c6c2714febd8e6ec5bfb3 /services/app/src | |
| parent | 050b65de6ba50784c32ecf0432ddfd6a80b17311 (diff) | |
| download | phperkaigi-2024-albatross-c19c84cd11380901c3f8ea60fa0319cca8d7b7d3.tar.gz phperkaigi-2024-albatross-c19c84cd11380901c3f8ea60fa0319cca8d7b7d3.tar.zst phperkaigi-2024-albatross-c19c84cd11380901c3f8ea60fa0319cca8d7b7d3.zip | |
hide link to answer of other users
Diffstat (limited to 'services/app/src')
| -rw-r--r-- | services/app/src/App.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/app/src/App.php b/services/app/src/App.php index 55f6ae3..e7d2816 100644 --- a/services/app/src/App.php +++ b/services/app/src/App.php @@ -260,12 +260,14 @@ final class App $ranking = $answerRepo->getRanking($quiz->quiz_id, upto: 20); } + $currentUser = $this->getCurrentUser($request); return $this->render($request, $response, 'quiz_view.html.twig', [ 'page_title' => "問題 #{$quiz->quiz_id}", 'quiz' => $quiz, 'ranking' => $ranking, 'is_ranking_hidden' => $quiz->isRankingHidden(), 'is_open' => $quiz->isOpenToAnswer(), + 'current_user_id' => $currentUser?->user_id, ]); } @@ -297,6 +299,7 @@ final class App 'answers' => $answers, 'is_ranking_hidden' => $quiz->isRankingHidden(), 'is_open' => $quiz->isOpenToAnswer(), + 'current_user_id' => isset($currentUser) ? $currentUser->user_id : null, ]); } |
