Browse Source

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

pull/31/head
richie 5 years ago committed by Gogs
parent
commit
53b82ef11c
  1. 4
      modules/contest.js

4
modules/contest.js

@ -207,7 +207,7 @@ app.get('/contest/:id', async (req, res) => {
for (let player of players) { for (let player of players) {
if (player.score_details[problem.problem.id]) { if (player.score_details[problem.problem.id]) {
problem.statistics.attempt++; problem.statistics.attempt++;
if ((contest.type === 'acm' && player.score_details[problem.problem.id].accepted) || ((contest.type === 'noi' || contest.type === 'ioi') && player.score_details[problem.problem.id].score === 100)) { if ((contest.type === 'acm' && player.score_details[problem.problem.id].accepted) || ((contest.type === 'noi' || contest.type === 'ioi') && player.score_details[problem.problem.id].score >= 100)) {
problem.statistics.accepted++; problem.statistics.accepted++;
} }
@ -458,12 +458,12 @@ app.get('/contest/submission/:id', async (req, res) => {
judge.problem_id = problems_id.indexOf(judge.problem_id) + 1; judge.problem_id = problems_id.indexOf(judge.problem_id) + 1;
judge.problem.title = syzoj.utils.removeTitleTag(judge.problem.title); judge.problem.title = syzoj.utils.removeTitleTag(judge.problem.title);
displayConfig.showUsage = true; displayConfig.showUsage = true;
displayConfig.showResult=true;
displayConfig.showDetailResult=true; displayConfig.showDetailResult=true;
if (judge.problem.type !== 'submit-answer') { if (judge.problem.type !== 'submit-answer') {
judge.codeLength = Buffer.from(judge.code).length; judge.codeLength = Buffer.from(judge.code).length;
judge.code = await syzoj.utils.highlight(judge.code, syzoj.languages[judge.language].highlight); judge.code = await syzoj.utils.highlight(judge.code, syzoj.languages[judge.language].highlight);
} }
res.render('submission_contest', { res.render('submission_contest', {
contest_id: contest.id, contest_id: contest.id,
info: getSubmissionInfo(judge, displayConfig), info: getSubmissionInfo(judge, displayConfig),

Loading…
Cancel
Save