From f12ae1905191af4772c129054db75ec2a7cfaa48 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Wed, 12 Apr 2023 16:44:34 +0800 Subject: [PATCH] chore(contest/submissions): reduce unnecessary sql queries --- web/app/controllers/contest_inside.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/app/controllers/contest_inside.php b/web/app/controllers/contest_inside.php index ee33aa0..6b7f418 100644 --- a/web/app/controllers/contest_inside.php +++ b/web/app/controllers/contest_inside.php @@ -427,6 +427,7 @@ function echoMySubmissions() { $options[] = ['value' => 'all', 'text' => '所有题目']; for ($i = 0; $i < count($problems); $i++) { $problem = UOJContestProblem::query($problems[$i]); + $problem->problem_number = $i; $options[] = [ 'value' => $problem->getLetter(), 'text' => $problem->getTitle(['with' => 'letter', 'simplify' => true]),