diff --git a/db/app_uoj233.sql b/db/app_uoj233.sql index 870225a..1d2c42f 100644 --- a/db/app_uoj233.sql +++ b/db/app_uoj233.sql @@ -181,7 +181,7 @@ CREATE TABLE `contests` ( `last_min` int NOT NULL, `player_num` int NOT NULL DEFAULT '0', `status` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, - `extra_config` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '{}', + `extra_config` json NOT NULL, `zan` int NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `status` (`status`,`id`) USING BTREE @@ -995,7 +995,8 @@ INSERT INTO `upgrades` (`name`, `status`, `updated_at`) VALUES ('21_problem_difficulty', 'up', now()), ('28_remote_judge', 'up', now()), ('31_problem_resources', 'up', now()), - ('36_decimal_score_range', 'up', now()); + ('36_decimal_score_range', 'up', now()), + ('40_contest_resources', 'up', now()); /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; UNLOCK TABLES; diff --git a/web/app/controllers/add_contest.php b/web/app/controllers/add_contest.php index abccb5d..35c924f 100644 --- a/web/app/controllers/add_contest.php +++ b/web/app/controllers/add_contest.php @@ -71,8 +71,9 @@ $time_form->handle = function (&$vdata) { DB::insert([ "insert into contests", - "(name, start_time, last_min, status)", "values", - DB::tuple([$vdata['name'], $start_time_str, $vdata['last_min'], 'unfinished']) + DB::bracketed_fields(["name", "start_time", "last_min", "status", "extra_config"]), + "values", + DB::tuple([$vdata['name'], $start_time_str, $vdata['last_min'], 'unfinished', "{}"]) ]); }; $time_form->succ_href = "/contests"; diff --git a/web/app/controllers/contest_inside.php b/web/app/controllers/contest_inside.php index e65f3b6..2dfee24 100644 --- a/web/app/controllers/contest_inside.php +++ b/web/app/controllers/contest_inside.php @@ -64,7 +64,7 @@ if (UOJContest::cur()->userCanStartFinalTest(Auth::user())) { $start_test_form->config['confirm']['smart'] = true; $start_test_form->runAtServer(); } - if ($contest['cur_progress'] >= CONTEST_TESTING && UOJContest::cur()->queryJudgeProgress()['fully_judged']) { + if ($contest['cur_progress'] == CONTEST_TESTING && UOJContest::cur()->queryJudgeProgress()['fully_judged']) { $publish_result_form = new UOJForm('publish_result'); $publish_result_form->handle = function () { UOJContest::announceOfficialResults(); @@ -492,133 +492,132 @@ function echoSelfReviews() {
此次比赛为 OI 赛制。
-注意:比赛时只显示测样例的结果。
- basicRule() === 'ACM') : ?> -此次比赛为 ACM 赛制。
-封榜时间:= $contest['frozen_time']->format('Y-m-d H:i:s') ?>
- basicRule() === 'IOI') : ?> -此次比赛为 IOI 赛制。
-比赛时显示的得分即最终得分。
- + basicRule() === 'OI') : ?> +此次比赛为 OI 赛制。
+注意:比赛时只显示测样例的结果。
+ basicRule() === 'ACM') : ?> +此次比赛为 ACM 赛制。
+封榜时间:= $contest['frozen_time']->format(UOJTime::FORMAT) ?>
+ basicRule() === 'IOI') : ?> +此次比赛为 IOI 赛制。
+比赛时显示的得分即最终得分。
+ - - = UOJLocale::get('contests::contest registrants') ?> + + = UOJLocale::get('contests::contest registrants') ?> + + + + 管理 + + + +