mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 13:38:41 +00:00
feat(problem): display judge_type
This commit is contained in:
parent
200e4f4f02
commit
6d913b066a
@ -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';
|
||||
}
|
||||
?>
|
||||
<div class="text-center small">
|
||||
<?= UOJLocale::get('problems::time limit') ?>: <?= $time_limit ? "$time_limit s" : "N/A" ?>
|
||||
 
|
||||
<?= UOJLocale::get('problems::memory limit') ?>: <?= $memory_limit ? "$memory_limit MB" : "N/A" ?>
|
||||
 
|
||||
<?= UOJLocale::get('problems::judge type') ?>: <?= $judge_type ? (UOJLocale::get("problems::judge type $judge_type") ?: $judge_type) : "N/A" ?>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<?php if (!UOJContest::cur()) : ?>
|
||||
<?php $contest_problems = UOJProblem::cur()->findInContests(); ?>
|
||||
<?php if (!empty($contest_problems)) : ?>
|
||||
<div class="alert alert-light">
|
||||
<h5 class="alert-heading"><?= UOJLocale::get('problems::the problem was used in the following contest') ?>:</h5>
|
||||
<ul class="mb-0">
|
||||
<?php usort($contest_problems, fn ($a, $b) => $a->contest->info['start_time'] < $b->contest->info['start_time']); ?>
|
||||
<?php foreach ($contest_problems as $cp) : ?>
|
||||
<?php if ($cp->userCanView(Auth::user())) : ?>
|
||||
<li>
|
||||
<?= $cp->contest->getLink(['class' => 'alert-link text-decoration-underline']) ?>
|
||||
<small>(<?= $cp->contest->info['start_time_str'] ?>)</small>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="statement">
|
||||
<?php if (!UOJContest::cur()) : ?>
|
||||
<?php $contest_problems = UOJProblem::cur()->findInContests(); ?>
|
||||
<?php if (!empty($contest_problems)) : ?>
|
||||
<div class="alert alert-light">
|
||||
<h5 class="alert-heading"><?= UOJLocale::get('problems::the problem was used in the following contest') ?>:</h5>
|
||||
<ul class="mb-0">
|
||||
<?php usort($contest_problems, fn ($a, $b) => $a->contest->info['start_time'] < $b->contest->info['start_time']); ?>
|
||||
<?php foreach ($contest_problems as $cp) : ?>
|
||||
<?php if ($cp->userCanView(Auth::user())) : ?>
|
||||
<li>
|
||||
<?= $cp->contest->getLink(['class' => 'alert-link text-decoration-underline']) ?>
|
||||
<small>(<?= $cp->contest->info['start_time_str'] ?>)</small>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<article class="mt-3 markdown-body">
|
||||
<?= $problem_content['statement'] ?>
|
||||
</article>
|
||||
|
@ -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',
|
||||
|
@ -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' => '附件下载',
|
||||
|
Loading…
Reference in New Issue
Block a user