mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
judge: fix submit answer subtask id (#1191)
This commit is contained in:
1 parent
cded9cc13b
commit
0e688f77b7
1 file changed
+3
-2
@@ -3,10 +3,10 @@ import { fs } from '@hydrooj/utils';
|
||||
import checkers from '../checkers';
|
||||
import { runFlow } from '../flow';
|
||||
import { runQueued } from '../sandbox';
|
||||
import { Context } from './interface';
|
||||
import { Context, ContextSubTask } from './interface';
|
||||
|
||||
function judgeCase(c: NormalizedCase) {
|
||||
return async (ctx: Context) => {
|
||||
return async (ctx: Context, ctxSubtask: ContextSubTask) => {
|
||||
const chars = /[a-zA-Z0-9_.-]/;
|
||||
const name = (ctx.config.filename && /^[a-zA-Z0-9-_#.]+$/.test(ctx.config.filename))
|
||||
? ctx.config.filename.replace('#', c.id.toString())
|
||||
@@ -56,6 +56,7 @@ function judgeCase(c: NormalizedCase) {
|
||||
}
|
||||
return {
|
||||
id: c.id,
|
||||
subtaskId: ctxSubtask.subtask.id,
|
||||
status,
|
||||
score,
|
||||
time: 0,
|
||||
|
||||
Reference in new issue
Block a user