Browse Source

Merge branch 'master' of zhaojunzhe/fair-web into master

master
richie 5 years ago committed by Gogs
parent
commit
fec294427f
  1. 4
      libs/submissions_process.js
  2. 3
      modules/contest.js
  3. 2
      views/submissions.ejs
  4. 4
      views/submissions_item.ejs

4
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
}
};
}

3
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);

2
views/submissions.ejs

@ -15,7 +15,7 @@
<% if (displayConfig.showOthers) { %>
<p>您可以看到其他人的提交。
<% } else { %>
<p>您只能看到自己的提交。</p>
<p>您只能看到自己的提交。 <a style="float:right" href="<%= syzoj.utils.makeUrl(['contest', contest.id]) %>">返回本次比赛</a></p>
<% } %>
</div>
<% } %>

4
views/submissions_item.ejs

@ -72,11 +72,7 @@
<script id="submissionItemTemplate" type="text/x-template">
<tr>
<td><i class="icon" :class="data.info.is_share ? 'smile outline success': 'meh outline'" style="font-size: 1.5em"></i></td>
<% if (active === 'submissions') { %>
<td><a :href="submissionLink"><b>#{{ data.info.submissionId }}</b></a></td>
<% } else { %>
<td><b>#{{ data.info.submissionId }}</b></td>
<% } %>
<td ref="problemLabel"><a ref="problemLabelTextFit"
style="width: 230px; height: 22px; display: block; margin: 0 auto; line-height: 22px;"
:href="problemLink"><b>#{{ config.inContest ? alpha(data.info.problemId) :

Loading…
Cancel
Save