From 75f6adb4ff5189f3d43630bf86dc75ba7e054f35 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 7 Feb 2023 20:41:37 +0800 Subject: [PATCH] refactor(contest): acm standings table --- web/app/libs/uoj-contest-lib.php | 6 +- web/app/views/contest-reviews.php | 6 + web/app/views/contest-standings.php | 73 +------ web/js/uoj.js | 317 +++++++++++++++++++++++++++- 4 files changed, 325 insertions(+), 77 deletions(-) diff --git a/web/app/libs/uoj-contest-lib.php b/web/app/libs/uoj-contest-lib.php index a88f28e..5ebc4bd 100644 --- a/web/app/libs/uoj-contest-lib.php +++ b/web/app/libs/uoj-contest-lib.php @@ -48,9 +48,9 @@ function updateContestPlayerNum($contest) { // problems: pos => id // // for individual competition: -// people : username, realname +// people : username, realname, null, username_color // for team competition: -// people : username, null, ['team_name' => team_name, 'members' => members] +// people : username, null, ['team_name' => team_name, 'members' => members], null // // for OI/IOI contest: // data : id, submit_time, submitter, problem_pos, score @@ -437,7 +437,7 @@ function calcStandings($contest, $contest_data, &$score, &$standings, $cfg = []) function calcACMScoreAndPenaltyForOneProblem($contest, $problem_id, $sub, $n_failures) { if (isset($contest['extra_config']['bonus']["problem_{$problem_id}"])) { - if ($sub[4] === 100) { + if ($sub[4] == 100) { return [0, -60 * 20]; } else { return [0, 0]; diff --git a/web/app/views/contest-reviews.php b/web/app/views/contest-reviews.php index 035e17e..89d4fb0 100644 --- a/web/app/views/contest-reviews.php +++ b/web/app/views/contest-reviews.php @@ -39,6 +39,12 @@ foreach ($contest_data['people'] as $person) { } ?> + +
+ ACM 比赛的赛后总结暂时不支持显示附加信息。 +
+ +