mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix problem_files
This commit is contained in:
1 parent
f33e2b932a
commit
896884062c
2 files changed
+6
-6
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.1.4",
|
"version": "3.1.5",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -268,11 +268,6 @@ export class ProblemDetailHandler extends ProblemHandler {
|
|||||||
discussionCount: dcnt,
|
discussionCount: dcnt,
|
||||||
tdoc: this.tdoc,
|
tdoc: this.tdoc,
|
||||||
tsdoc: this.tsdoc,
|
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.response.template = 'problem_detail.html';
|
||||||
this.extraTitleContent = this.pdoc.title;
|
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/`)
|
||||||
.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.response.body.tdoc) {
|
||||||
if (this.psdoc?.rid) {
|
if (this.psdoc?.rid) {
|
||||||
this.response.body.rdoc = await record.get(this.domainId, this.psdoc.rid);
|
this.response.body.rdoc = await record.get(this.domainId, this.psdoc.rid);
|
||||||
|
|||||||
Reference in new issue
Block a user