From 72faf6c8d351a32a661f9f6cd5d8337bfece1f8c Mon Sep 17 00:00:00 2001 From: panda Date: Thu, 11 May 2023 10:54:56 +0800 Subject: [PATCH] core: fix showRecord on locked ioi contest (#575) --- packages/hydrooj/src/model/contest.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/hydrooj/src/model/contest.ts b/packages/hydrooj/src/model/contest.ts index 0d60214e..e8da188e 100644 --- a/packages/hydrooj/src/model/contest.ts +++ b/packages/hydrooj/src/model/contest.ts @@ -247,8 +247,7 @@ const oi = buildContestRule({ }, showScoreboard: (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 && !isLocked(tdoc), + showRecord: (tdoc, now) => now > tdoc.endAt, async scoreboardHeader(config, _, tdoc, pdict) { const columns: ScoreboardNode[] = [ { type: 'rank', value: '#' }, @@ -372,7 +371,8 @@ const oi = buildContestRule({ const ioi = buildContestRule({ TEXT: 'IOI', 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, showScoreboard: (tdoc, now) => now > tdoc.beginAt, }, oi);