mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: hide nAccept in contest
This commit is contained in:
1 parent
b35d75cfe8
commit
719cc0570c
5 files changed
+10
-5
No files matched your search
@@ -270,10 +270,13 @@ export class ContestProblemHandler extends Handler {
|
||||
// @ts-ignore
|
||||
if (this.pdoc.domainId !== domainId) this.pdoc.docId = `${this.pdoc.domainId}:${this.pdoc.docId}`;
|
||||
this.attended = this.tsdoc && this.tsdoc.attend === 1;
|
||||
const showAccept = contest.canShowScoreboard.call(this, this.tdoc, true);
|
||||
if (!showAccept) this.pdoc.nAccept = 0;
|
||||
if (contest.isNotStarted(this.tdoc)) throw new ContestNotLiveError(tid);
|
||||
if (!contest.isDone(this.tdoc) && !this.attended) throw new ContestNotAttendedError(tid);
|
||||
this.response.template = 'problem_detail.html';
|
||||
this.response.body = {
|
||||
showAccept,
|
||||
tdoc: this.tdoc,
|
||||
tsdoc: this.tsdoc,
|
||||
pdoc: this.pdoc,
|
||||
|
||||
Reference in new issue
Block a user