core: fix showRecord on locked ioi contest (#575)

pull/577/head
panda 1 year ago committed by GitHub
parent c1bd317e97
commit 72faf6c8d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -247,8 +247,7 @@ const oi = buildContestRule({
}, },
showScoreboard: (tdoc, now) => now > tdoc.endAt, showScoreboard: (tdoc, now) => now > tdoc.endAt,
showSelfRecord: (tdoc, now) => now > tdoc.endAt, showSelfRecord: (tdoc, now) => now > tdoc.endAt,
// eslint-disable-next-line @typescript-eslint/no-use-before-define showRecord: (tdoc, now) => now > tdoc.endAt,
showRecord: (tdoc, now) => now > tdoc.endAt && !isLocked(tdoc),
async scoreboardHeader(config, _, tdoc, pdict) { async scoreboardHeader(config, _, tdoc, pdict) {
const columns: ScoreboardNode[] = [ const columns: ScoreboardNode[] = [
{ type: 'rank', value: '#' }, { type: 'rank', value: '#' },
@ -372,7 +371,8 @@ const oi = buildContestRule({
const ioi = buildContestRule({ const ioi = buildContestRule({
TEXT: 'IOI', TEXT: 'IOI',
submitAfterAccept: false, submitAfterAccept: false,
showRecord: (tdoc, now) => now > tdoc.endAt, // eslint-disable-next-line @typescript-eslint/no-use-before-define
showRecord: (tdoc, now) => now > tdoc.endAt && !isLocked(tdoc),
showSelfRecord: () => true, showSelfRecord: () => true,
showScoreboard: (tdoc, now) => now > tdoc.beginAt, showScoreboard: (tdoc, now) => now > tdoc.beginAt,
}, oi); }, oi);

Loading…
Cancel
Save