From 6d913b066a78f2cacfcac981cae932986860b2fe Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sun, 26 Feb 2023 17:09:27 +0800 Subject: [PATCH] feat(problem): display judge_type --- web/app/controllers/problem.php | 48 +++++++++++++++++-------------- web/app/locale/problems/en.php | 6 ++++ web/app/locale/problems/zh-cn.php | 6 ++++ 3 files changed, 38 insertions(+), 22 deletions(-) diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index a4bd380..58ef7fd 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -302,43 +302,47 @@ if (UOJContest::cur()) { if (UOJProblem::info('type') == 'local') { $time_limit = $conf instanceof UOJProblemConf ? $conf->getVal('time_limit', 1) : null; $memory_limit = $conf instanceof UOJProblemConf ? $conf->getVal('memory_limit', 256) : null; + $judge_type = $conf instanceof UOJProblemConf ? $conf->getNonTraditionalJudgeType() : null; } else if (UOJProblem::info('type') == 'remote') { $time_limit = UOJProblem::cur()->getExtraConfig('time_limit'); $memory_limit = UOJProblem::cur()->getExtraConfig('memory_limit'); + $judge_type = 'remote_judge'; } ?>
: : +   + :

- - findInContests(); ?> - -
-
:
- -
- -
- - -
+ + findInContests(); ?> + +
+
:
+
    + $a->contest->info['start_time'] < $b->contest->info['start_time']); ?> + + userCanView(Auth::user())) : ?> +
  • + contest->getLink(['class' => 'alert-link text-decoration-underline']) ?> + (contest->info['start_time_str'] ?>) +
  • + + +
+
+ +
+ + +
diff --git a/web/app/locale/problems/en.php b/web/app/locale/problems/en.php index e591ffd..3cc2d8a 100644 --- a/web/app/locale/problems/en.php +++ b/web/app/locale/problems/en.php @@ -59,6 +59,12 @@ return [ 'uploader' => 'Uploader', 'time limit' => 'Time limit', 'memory limit' => 'Memory limit', + 'judge type' => 'Judge type', + 'judge type traditional' => 'Traditional', + 'judge type custom_judger' => 'Custom judger', + 'judge type submit_answer' => 'Submit answer', + 'judge type interaction' => 'Interaction', + 'judge type remote_judge' => 'Remote Judge', 'attachments' => 'Attachments', 'test data' => 'Test data', 'attachments download' => 'Attachments download', diff --git a/web/app/locale/problems/zh-cn.php b/web/app/locale/problems/zh-cn.php index ff53f9a..23abc9b 100644 --- a/web/app/locale/problems/zh-cn.php +++ b/web/app/locale/problems/zh-cn.php @@ -59,6 +59,12 @@ return [ 'uploader' => '上传者', 'time limit' => '时间限制', 'memory limit' => '内存限制', + 'judge type' => '测评类型', + 'judge type traditional' => '传统型', + 'judge type custom_judger' => '自定义评测机', + 'judge type submit_answer' => '提交答案', + 'judge type interaction' => '交互型', + 'judge type remote_judge' => '远端评测', 'attachments' => '附件', 'test data' => '测试数据', 'attachments download' => '附件下载',