mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add default import operator
This commit is contained in:
4 files changed
+9
-5
No files matched your search
@@ -163,6 +163,7 @@ export enum ProblemType {
|
|||||||
SubmitAnswer = 'submit_answer',
|
SubmitAnswer = 'submit_answer',
|
||||||
Interactive = 'interactive',
|
Interactive = 'interactive',
|
||||||
Objective = 'objective',
|
Objective = 'objective',
|
||||||
|
Remote = 'remote_judge',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SubtaskType {
|
export enum SubtaskType {
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ export class ProblemModel {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async import(domainId: string, filepath: string, operator: number) {
|
static async import(domainId: string, filepath: string, operator = 1) {
|
||||||
let tmpdir = '';
|
let tmpdir = '';
|
||||||
let del = false;
|
let del = false;
|
||||||
if (filepath.endsWith('.zip')) {
|
if (filepath.endsWith('.zip')) {
|
||||||
@@ -482,6 +482,7 @@ export class ProblemModel {
|
|||||||
await fs.mkdir(tmpdir);
|
await fs.mkdir(tmpdir);
|
||||||
const pdocs = await ProblemModel.getMulti(domainId, {}, ProblemModel.PROJECTION_PUBLIC).toArray();
|
const pdocs = await ProblemModel.getMulti(domainId, {}, ProblemModel.PROJECTION_PUBLIC).toArray();
|
||||||
for (const pdoc of pdocs) {
|
for (const pdoc of pdocs) {
|
||||||
|
if (process.env.HYDRO_CLI) logger.info(`Exporting problem ${pdoc.pid} (${pdoc.title})`);
|
||||||
const problemPath = path.join(tmpdir, `${pdoc.docId}`);
|
const problemPath = path.join(tmpdir, `${pdoc.docId}`);
|
||||||
await fs.mkdir(problemPath);
|
await fs.mkdir(problemPath);
|
||||||
const problemYaml = path.join(problemPath, 'problem.yaml');
|
const problemYaml = path.join(problemPath, 'problem.yaml');
|
||||||
|
|||||||
@@ -60,3 +60,9 @@
|
|||||||
p
|
p
|
||||||
margin-top: rem(7px);
|
margin-top: rem(7px);
|
||||||
font-size: larger
|
font-size: larger
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.notification {
|
||||||
|
display: none !important
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -106,10 +106,6 @@ about:
|
|||||||
我们力求对服务进行完善的维护,以保护信息免遭意外或恶意的破坏。因此,当您从我们的服务中删除信息后,
|
我们力求对服务进行完善的维护,以保护信息免遭意外或恶意的破坏。因此,当您从我们的服务中删除信息后,
|
||||||
我们可能不会立即从在用的服务器中删除这些信息的残留副本,也可能不会从备份系统中删除相应的信息。
|
我们可能不会立即从在用的服务器中删除这些信息的残留副本,也可能不会从备份系统中删除相应的信息。
|
||||||
|
|
||||||
#### 4. 信息安全
|
|
||||||
我们为您提供SSL加密访问服务,您可以通过SSL(https)使用我们的服务,这可以很大程度上保障在传输过程中您信息的安全。
|
|
||||||
对于敏感数据(如您的密码),我们承诺在存储时进行高强度不可逆加密。{{ name }} 的管理员、维护人员等均不能够访问到敏感数据的明文,所有操作均无人工介入。
|
|
||||||
|
|
||||||
# tos 服务条款
|
# tos 服务条款
|
||||||
#### 0. 欢迎使用 {{ name }}
|
#### 0. 欢迎使用 {{ name }}
|
||||||
注册 {{ name }} 帐户和/或使用 {{ name }} 提供的服务(包括网页提供的在线服务和题目评测的非在线服务等),即表示您已同意本条款。
|
注册 {{ name }} 帐户和/或使用 {{ name }} 提供的服务(包括网页提供的在线服务和题目评测的非在线服务等),即表示您已同意本条款。
|
||||||
|
|||||||
Reference in new issue
Block a user