mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: fix bugs (#672)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
afbf3b6174
commit
f305cbfc60
6 files changed
+15
-7
No files matched your search
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user