From d3f371330d7828047d5a1d016a1509eca1e223bd Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Fri, 2 Aug 2019 17:17:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8F=90=E4=BA=A4=E6=AF=94=E8=B5=9B?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7=E9=93=BE=E6=8E=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/submissions_process.js | 4 ++-- modules/contest.js | 3 ++- views/submissions.ejs | 2 +- views/submissions_item.ejs | 4 ---- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libs/submissions_process.js b/libs/submissions_process.js index 6203d1e..05e89c9 100644 --- a/libs/submissions_process.js +++ b/libs/submissions_process.js @@ -77,7 +77,7 @@ const processOverallResult = (source, config) => { } return { compile: source.compile, - judge: config.showDetailResult ? (source.judge && { + judge: { subtasks: source.judge.subtasks && source.judge.subtasks.map(st => ({ score: st.score, cases: st.cases.map(cs => ({ @@ -97,7 +97,7 @@ const processOverallResult = (source, config) => { } })) })) - }) : null + } }; } diff --git a/modules/contest.js b/modules/contest.js index a9ea304..e8fa4f4 100644 --- a/modules/contest.js +++ b/modules/contest.js @@ -457,7 +457,8 @@ app.get('/contest/submission/:id', async (req, res) => { const problems_id = await contest.getProblems(); judge.problem_id = problems_id.indexOf(judge.problem_id) + 1; judge.problem.title = syzoj.utils.removeTitleTag(judge.problem.title); - + displayConfig.showUsage = true; + displayConfig.showDetailResult=true; if (judge.problem.type !== 'submit-answer') { judge.codeLength = Buffer.from(judge.code).length; judge.code = await syzoj.utils.highlight(judge.code, syzoj.languages[judge.language].highlight); diff --git a/views/submissions.ejs b/views/submissions.ejs index a0bfd13..0ac1dbc 100644 --- a/views/submissions.ejs +++ b/views/submissions.ejs @@ -15,7 +15,7 @@ <% if (displayConfig.showOthers) { %>
您可以看到其他人的提交。 <% } else { %> -
您只能看到自己的提交。
+您只能看到自己的提交。 返回本次比赛
<% } %> <% } %> diff --git a/views/submissions_item.ejs b/views/submissions_item.ejs index 58cc96f..aba6114 100644 --- a/views/submissions_item.ejs +++ b/views/submissions_item.ejs @@ -72,11 +72,7 @@