diff --git a/packages/hydrooj/src/handler/judge.ts b/packages/hydrooj/src/handler/judge.ts index c8422e10e..472b70583 100644 --- a/packages/hydrooj/src/handler/judge.ts +++ b/packages/hydrooj/src/handler/judge.ts @@ -85,7 +85,7 @@ export async function postJudge(rdoc: RecordDoc) { try { const config = yaml.load(pdoc.config as string) as ProblemConfigFile; assert(config.subtasks instanceof Array); - const file = await storage.get(`submission/${rdoc.files.hack}`); + const file = await storage.get(`submission/${rdoc.files.hack.split('#')[0]}`); assert(file); const hackSubtask = config.subtasks[config.subtasks.length - 1]; hackSubtask.cases ||= []; diff --git a/packages/hydrooj/src/handler/problem.ts b/packages/hydrooj/src/handler/problem.ts index cf67d6516..5dc6882ff 100644 --- a/packages/hydrooj/src/handler/problem.ts +++ b/packages/hydrooj/src/handler/problem.ts @@ -564,6 +564,7 @@ export class ProblemHackHandler extends ProblemDetailHandler { this.response.body = { pdoc: this.pdoc, udoc: this.udoc, + rid: this.rdoc._id, title: this.pdoc.title, page_name: this.tdoc ? 'contest_detail_problem_hack' : 'problem_hack', }; diff --git a/packages/ui-default/templates/problem_hack.html b/packages/ui-default/templates/problem_hack.html index 597007f1d..6f76d1d28 100644 --- a/packages/ui-default/templates/problem_hack.html +++ b/packages/ui-default/templates/problem_hack.html @@ -5,7 +5,7 @@
-

{{ _('Hack a submission') }}

+

{{ _('Hack submission') }} #{{ rid }}

diff --git a/packages/ui-default/templates/record_detail.html b/packages/ui-default/templates/record_detail.html index 0038a5e0e..a6cbab979 100644 --- a/packages/ui-default/templates/record_detail.html +++ b/packages/ui-default/templates/record_detail.html @@ -53,7 +53,7 @@