Browse Source

Add runner_message

pull/6/head
Menci 7 years ago
parent
commit
76a51bd994
  1. 2
      modules/submission.js
  2. 4
      views/submission_content.ejs

2
modules/submission.js

@ -147,6 +147,7 @@ app.get('/submission/:id', async (req, res) => {
judge.allowedSeeCase = await judge.isAllowedSeeCaseBy(res.locals.user);
judge.allowedSeeData = await judge.isAllowedSeeDataBy(res.locals.user);
judge.allowedRejudge = await judge.problem.isAllowedEditBy(res.locals.user);
judge.allowedManage = await judge.problem.isAllowedManageBy(res.locals.user);
if (contest) {
let problems_id = await contest.getProblems();
@ -194,6 +195,7 @@ app.get('/submission/:id/ajax', async (req, res) => {
judge.allowedSeeCase = await judge.isAllowedSeeCaseBy(res.locals.user);
judge.allowedSeeData = await judge.isAllowedSeeDataBy(res.locals.user);
judge.allowedRejudge = await judge.problem.isAllowedEditBy(res.locals.user);
judge.allowedManage = await judge.problem.isAllowedManageBy(res.locals.user);
if (contest) {
let problems_id = await contest.getProblems();

4
views/submission_content.ejs

@ -163,6 +163,10 @@ else problemUrl = syzoj.utils.makeUrl(['problem', judge.problem_id]);
<strong>标准错误</strong>
<div class="ui existing segment"><pre style="margin-top: 0; margin-bottom: 0; "><code><%= testcase.user_err %></code></pre></div>
<% } %>
<% if (testcase.runner_message && judge.allowedManage) { %>
<strong>调试信息</strong>
<div class="ui existing segment"><pre style="margin-top: 0; margin-bottom: 0; "><code><%= testcase.runner_message %></code></pre></div>
<% } %>
</p>
<% } %>
</div>

Loading…
Cancel
Save