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 @@