core: handle problem projection

This commit is contained in:
undefined committed 2022-02-10 20:44:30 +08:00
1 parent 3daafe5396
commit 9ea781f800
5 files changed
+18 -6

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ export class ContestDetailHandler extends Handler {
tdoc, tsdoc, udict, page,
};
if (contest.isNotStarted(tdoc)) return;
const pdict = await problem.getList(domainId, tdoc.pids, true);
const pdict = await problem.getList(domainId, tdoc.pids, true, undefined, undefined, problem.PROJECTION_CONTEST_LIST);
const psdict = {};
let rdict = {};
if (tsdoc) {
+1 -1
View File
@@ -74,7 +74,7 @@ class HomeworkDetailHandler extends Handler {
tdoc, tsdoc, udict, ddocs, page, dpcount, dcount,
};
if (contest.isNotStarted(tdoc)) return;
const pdict = await problem.getList(domainId, tdoc.pids, true);
const pdict = await problem.getList(domainId, tdoc.pids, true, undefined, undefined, problem.PROJECTION_CONTEST_LIST);
const psdict = {};
let rdict = {};
if (tsdoc) {
+1
View File
@@ -297,6 +297,7 @@ export class ProblemDetailHandler extends ProblemHandler {
if (!contest.canShowScoreboard(this.tdoc) || !contest.isLocked(this.tdoc)) {
delete this.pdoc.nAccept;
delete this.pdoc.nSubmit;
delete this.pdoc.difficulty;
delete this.pdoc.stats;
}
} else if (!problem.canViewBy(this.pdoc, this.user)) {