core: fix problem_files

This commit is contained in:
undefined committed 2021-10-25 19:08:45 +08:00
1 parent f33e2b932a
commit 896884062c
2 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.1.4",
"version": "3.1.5",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+5 -5
View File
@@ -268,11 +268,6 @@ export class ProblemDetailHandler extends ProblemHandler {
discussionCount: dcnt,
tdoc: this.tdoc,
tsdoc: this.tsdoc,
page_name: this.tdoc
? this.tdoc.rule === 'homework'
? 'homework_detail_problem'
: 'contest_detail_problem'
: 'problem_detail',
};
this.response.template = 'problem_detail.html';
this.extraTitleContent = this.pdoc.title;
@@ -287,6 +282,11 @@ export class ProblemDetailHandler extends ProblemHandler {
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`)
.replace(/="file:\/\//g, `="./${this.pdoc.docId}/file/`);
}
this.response.body.page_name = this.tdoc
? this.tdoc.rule === 'homework'
? 'homework_detail_problem'
: 'contest_detail_problem'
: 'problem_detail';
if (!this.response.body.tdoc) {
if (this.psdoc?.rid) {
this.response.body.rdoc = await record.get(this.domainId, this.psdoc.rid);