|
|
|
@ -344,6 +344,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
|
|
|
|
const pdoc = await problem.get(this.pdoc.reference.domainId, this.pdoc.reference.pid);
|
|
|
|
|
if (!ddoc || !pdoc) throw new ProblemNotFoundError(this.pdoc.reference.domainId, this.pdoc.reference.pid);
|
|
|
|
|
this.pdoc.config = pdoc.config;
|
|
|
|
|
this.pdoc.additional_file = pdoc.additional_file;
|
|
|
|
|
}
|
|
|
|
|
if (typeof this.pdoc.config !== 'string') {
|
|
|
|
|
let baseLangs;
|
|
|
|
@ -384,7 +385,8 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
|
|
|
|
const fields = ['attend', 'startAt'];
|
|
|
|
|
if (this.tdoc.duration) fields.push('endAt');
|
|
|
|
|
if (contest.canShowSelfRecord.call(this, this.tdoc, true)) fields.push('detail');
|
|
|
|
|
this.response.body.tsdoc = pick(this.tsdoc, fields);
|
|
|
|
|
this.tsdoc = pick(this.tsdoc, fields);
|
|
|
|
|
this.response.body.tsdoc = this.tsdoc;
|
|
|
|
|
}
|
|
|
|
|
this.response.template = 'problem_detail.html';
|
|
|
|
|
this.UiContext.extraTitleContent = this.pdoc.title;
|
|
|
|
@ -502,6 +504,7 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
|
|
|
|
pdoc: this.pdoc,
|
|
|
|
|
udoc: this.udoc,
|
|
|
|
|
tdoc: this.tdoc,
|
|
|
|
|
tsdoc: this.tsdoc,
|
|
|
|
|
title: this.pdoc.title,
|
|
|
|
|
page_name: this.tdoc
|
|
|
|
|
? this.tdoc.rule === 'homework'
|
|
|
|
|