Browse Source

'Compiled' => 'Submitted'

master
Menci 7 years ago
parent
commit
2f29b5e0b7
  1. 4
      modules/contest.js
  2. 6
      modules/submission.js
  3. 6
      static/style.css
  4. 2
      views/util.ejs

4
modules/contest.js

@ -149,7 +149,7 @@ app.get('/contest/:id', async (req, res) => {
let judge_state = await JudgeState.fromID(player.score_details[problem.problem.id].judge_id); let judge_state = await JudgeState.fromID(player.score_details[problem.problem.id].judge_id);
problem.status = judge_state.status; problem.status = judge_state.status;
if (!contest.ended && !await problem.problem.isAllowedEditBy(res.locals.user) && !['Compile Error', 'Waiting', 'Compiling'].includes(problem.status)) { if (!contest.ended && !await problem.problem.isAllowedEditBy(res.locals.user) && !['Compile Error', 'Waiting', 'Compiling'].includes(problem.status)) {
problem.status = 'Compiled'; problem.status = 'Submitted';
} }
problem.judge_id = player.score_details[problem.problem.id].judge_id; problem.judge_id = player.score_details[problem.problem.id].judge_id;
} }
@ -306,7 +306,7 @@ app.get('/contest/:id/submissions', async (req, res) => {
if (contest.type === 'noi' && !contest.ended && !await obj.problem.isAllowedEditBy(res.locals.user)) { if (contest.type === 'noi' && !contest.ended && !await obj.problem.isAllowedEditBy(res.locals.user)) {
if (!['Compile Error', 'Waiting', 'Compiling'].includes(obj.status)) { if (!['Compile Error', 'Waiting', 'Compiling'].includes(obj.status)) {
obj.status = 'Compiled'; obj.status = 'Submitted';
} }
} }
}); });

6
modules/submission.js

@ -108,7 +108,7 @@ app.get('/submissions/:id/ajax', async (req, res) => {
if (contest.type === 'noi' && !contest.ended && !await judge_state.problem.isAllowedEditBy(res.locals.user)) { if (contest.type === 'noi' && !contest.ended && !await judge_state.problem.isAllowedEditBy(res.locals.user)) {
if (!['Compile Error', 'Waiting', 'Compiling'].includes(judge_state.status)) { if (!['Compile Error', 'Waiting', 'Compiling'].includes(judge_state.status)) {
judge_state.status = 'Compiled'; judge_state.status = 'Submitted';
} }
} }
} }
@ -156,7 +156,7 @@ app.get('/submission/:id', async (req, res) => {
if (contest.type === 'noi' && !contest.ended && !await judge.problem.isAllowedEditBy(res.locals.user)) { if (contest.type === 'noi' && !contest.ended && !await judge.problem.isAllowedEditBy(res.locals.user)) {
if (!['Compile Error', 'Waiting', 'Compiling'].includes(judge.status)) { if (!['Compile Error', 'Waiting', 'Compiling'].includes(judge.status)) {
judge.status = 'Compiled'; judge.status = 'Submitted';
} }
} }
} }
@ -204,7 +204,7 @@ app.get('/submission/:id/ajax', async (req, res) => {
if (contest.type === 'noi' && !contest.ended && !await judge.problem.isAllowedEditBy(res.locals.user)) { if (contest.type === 'noi' && !contest.ended && !await judge.problem.isAllowedEditBy(res.locals.user)) {
if (!['Compile Error', 'Waiting', 'Compiling'].includes(judge.status)) { if (!['Compile Error', 'Waiting', 'Compiling'].includes(judge.status)) {
judge.status = 'Compiled'; judge.status = 'Submitted';
} }
} }
} }

6
static/style.css

@ -361,9 +361,9 @@ body > .ui.page.dimmer {
} }
*/ */
:not(.status_detail).status.compiled, :not(.status_detail).status.submitted,
.title:hover .status_detail.status.compiled, .title:hover .status_detail.status.submitted,
.title.active .status_detail.status.compiled, .title.active .status_detail.status.submitted,
:not(.status_detail).status.accepted, :not(.status_detail).status.accepted,
.title:hover .status_detail.status.accepted, .title:hover .status_detail.status.accepted,
.title.active .status_detail.status.accepted { .title.active .status_detail.status.accepted {

2
views/util.ejs

@ -29,7 +29,7 @@ this.icon = {
'Running': 'spinner', 'Running': 'spinner',
'Compiling': 'spinner', 'Compiling': 'spinner',
'Compile Error': 'code', 'Compile Error': 'code',
'Compiled': 'checkmark', 'Submitted': 'checkmark',
'System Error': 'server', 'System Error': 'server',
'No Testdata': 'folder open outline', 'No Testdata': 'folder open outline',
'Partially Correct': 'minus', 'Partially Correct': 'minus',

Loading…
Cancel
Save