|
|
@ -80,7 +80,11 @@ app.get('/submissions/:id/ajax', async (req, res) => { |
|
|
|
judge_state.allowedSeeCode = await judge_state.isAllowedSeeCodeBy(res.locals.user); |
|
|
|
judge_state.allowedSeeCode = await judge_state.isAllowedSeeCodeBy(res.locals.user); |
|
|
|
judge_state.allowedSeeData = await judge_state.isAllowedSeeDataBy(res.locals.user); |
|
|
|
judge_state.allowedSeeData = await judge_state.isAllowedSeeDataBy(res.locals.user); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let contest; |
|
|
|
|
|
|
|
if (judge_state.type === 1) contest = await Contest.fromID(judge_state.type_info); |
|
|
|
|
|
|
|
|
|
|
|
res.render('submissions_item', { |
|
|
|
res.render('submissions_item', { |
|
|
|
|
|
|
|
contest: contest, |
|
|
|
judge: judge_state |
|
|
|
judge: judge_state |
|
|
|
}); |
|
|
|
}); |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
@ -105,6 +109,7 @@ app.get('/submission/:id', async (req, res) => { |
|
|
|
judge.code = await syzoj.utils.highlight(judge.code, syzoj.config.languages[judge.language].highlight); |
|
|
|
judge.code = await syzoj.utils.highlight(judge.code, syzoj.config.languages[judge.language].highlight); |
|
|
|
judge.allowedSeeResult = await judge.isAllowedSeeResultBy(res.locals.user); |
|
|
|
judge.allowedSeeResult = await judge.isAllowedSeeResultBy(res.locals.user); |
|
|
|
judge.allowedSeeCode = await judge.isAllowedSeeCodeBy(res.locals.user); |
|
|
|
judge.allowedSeeCode = await judge.isAllowedSeeCodeBy(res.locals.user); |
|
|
|
|
|
|
|
judge.allowedSeeCase = await judge.isAllowedSeeCaseBy(res.locals.user); |
|
|
|
judge.allowedSeeData = await judge.isAllowedSeeDataBy(res.locals.user); |
|
|
|
judge.allowedSeeData = await judge.isAllowedSeeDataBy(res.locals.user); |
|
|
|
judge.allowedRejudge = await judge.problem.isAllowedEditBy(res.locals.user); |
|
|
|
judge.allowedRejudge = await judge.problem.isAllowedEditBy(res.locals.user); |
|
|
|
|
|
|
|
|
|
|
@ -140,6 +145,7 @@ app.get('/submission/:id/ajax', async (req, res) => { |
|
|
|
judge.code = await syzoj.utils.highlight(judge.code, syzoj.config.languages[judge.language].highlight); |
|
|
|
judge.code = await syzoj.utils.highlight(judge.code, syzoj.config.languages[judge.language].highlight); |
|
|
|
judge.allowedSeeResult = await judge.isAllowedSeeResultBy(res.locals.user); |
|
|
|
judge.allowedSeeResult = await judge.isAllowedSeeResultBy(res.locals.user); |
|
|
|
judge.allowedSeeCode = await judge.isAllowedSeeCodeBy(res.locals.user); |
|
|
|
judge.allowedSeeCode = await judge.isAllowedSeeCodeBy(res.locals.user); |
|
|
|
|
|
|
|
judge.allowedSeeCase = await judge.isAllowedSeeCaseBy(res.locals.user); |
|
|
|
judge.allowedSeeData = await judge.isAllowedSeeDataBy(res.locals.user); |
|
|
|
judge.allowedSeeData = await judge.isAllowedSeeDataBy(res.locals.user); |
|
|
|
judge.allowedRejudge = await judge.problem.isAllowedEditBy(res.locals.user); |
|
|
|
judge.allowedRejudge = await judge.problem.isAllowedEditBy(res.locals.user); |
|
|
|
|
|
|
|
|
|
|
|