From df7d1784d39a26826f59e750f0a974dc8cb59dbe Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Thu, 23 Feb 2023 11:25:39 +0800 Subject: [PATCH] feat(contest/submissions): problem title in chooser --- web/app/controllers/contest_inside.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/app/controllers/contest_inside.php b/web/app/controllers/contest_inside.php index bb76f0f..138d1d1 100644 --- a/web/app/controllers/contest_inside.php +++ b/web/app/controllers/contest_inside.php @@ -426,8 +426,11 @@ function echoMySubmissions() { $options = []; $options[] = ['value' => 'all', 'text' => '所有题目']; for ($i = 0; $i < count($problems); $i++) { - $letter = chr(ord('A') + $i); - $options[] = ['value' => $letter, 'text' => "{$letter} 题"]; + $problem = UOJContestProblem::query($problems[$i]); + $options[] = [ + 'value' => $problem->getLetter(), + 'text' => $problem->getTitle(['with' => 'letter', 'simplify' => true]), + ]; } $chosen = UOJRequest::get('p'); @@ -455,7 +458,7 @@ function echoMySubmissions() { 'show_all_submissions_status' => Cookie::get('show_all_submissions') !== null, 'options' => $options, 'chosen' => $chosen, - 'conds' => $conds + 'conds' => $conds, ]); }