chore(contest/submissions): reduce unnecessary sql queries

This commit is contained in:
Baoshuo Ren 2023-04-12 16:44:34 +08:00
parent 36255cb705
commit f12ae19051
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -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]),