diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index cfd085b..120b17d 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -241,10 +241,10 @@ if ($pre_submit_check_ret === true && !$no_more_submission) { return in_array($opt, $remote_provider['submit_type']) ? '' : '无效选项'; }, null); $answer_form->add('answer_remote_account_data', '', function ($data) { - return json_decode($data) !== null ? '' : '无效数据'; + return $_POST['answer_remote_submit_type'] == 'bot' || json_decode($data) !== null ? '' : '无效数据'; }, null); $answer_form->add('answer_remote_submission_id', '', function ($id) { - return validateUInt($id) ? '' : '无效 ID'; + return $_POST['answer_remote_submit_type'] != 'archive' || validateUInt($id) ? '' : '无效 ID'; }, null); $answer_form->appendHTML(<<Remote Judge 配置 diff --git a/web/app/controllers/submission.php b/web/app/controllers/submission.php index 4ce2e96..f89c9dc 100644 --- a/web/app/controllers/submission.php +++ b/web/app/controllers/submission.php @@ -168,7 +168,7 @@ if ($perm['manager_view']) { ?> -
+
echoContent() ?>