mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: 修复错误
* 无法下载测试数据的问题 * 无法导出作业成绩单的问题 * cli 模式无法载入的问题 * syzoj 导入跳转错误的问题
This commit is contained in:
1 parent
66639b14de
commit
f0b9bee937
8 files changed
+19
-26
No files matched your search
@@ -370,7 +370,7 @@ class HomeworkScoreboardDownloadHandler extends HomeworkHandler {
|
||||
html: (rows) => this.renderHTML('contest_scoreboard_download_html.html', { rows }),
|
||||
};
|
||||
if (!getContent[ext]) throw new ValidationError('ext');
|
||||
const [, rows] = await this.getScoreboard(domainId, tid, true, document.TYPE_CONTEST);
|
||||
const [, rows] = await this.getScoreboard(domainId, tid, true, document.TYPE_HOMEWORK);
|
||||
this.binary(await getContent[ext](rows), `${this.tdoc.title}.${ext}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,12 +247,12 @@ class ProblemImportSYZOJHandler extends Handler {
|
||||
domainId, targetPid, hidden,
|
||||
protocol, host, pid, false,
|
||||
);
|
||||
this.response.body = { pid: pid || docId };
|
||||
this.response.redirect = this.url('problem_settings', { pid: pid || docId });
|
||||
this.response.body = { pid: targetPid || docId };
|
||||
this.response.redirect = this.url('problem_settings', { pid: targetPid || docId });
|
||||
} else {
|
||||
const docId = await this.v2(domainId, targetPid, hidden, url);
|
||||
this.response.body = { pid: pid || docId };
|
||||
this.response.redirect = this.url('problem_settings', { pid: pid || docId });
|
||||
this.response.body = { pid: targetPid || docId };
|
||||
this.response.redirect = this.url('problem_settings', { pid: targetPid || docId });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user