mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: fix bugs (#702)
This commit is contained in:
1 parent
55b4e1aaf0
commit
453d9076b0
10 files changed
+18
-23
No files matched your search
@@ -456,8 +456,8 @@ Numeric PID: 문제 번호
|
|||||||
Oh, the user doesn't have any contributions!: 아직 기여가 없습니다.
|
Oh, the user doesn't have any contributions!: 아직 기여가 없습니다.
|
||||||
Oh, the user hasn't created any discussions yet!: 아직 토론을 시작하지 않았습니다.
|
Oh, the user hasn't created any discussions yet!: 아직 토론을 시작하지 않았습니다.
|
||||||
Oh, the user hasn't submitted yet!: 아직 제출하지 않았습니다 _(:зゝ∠)
|
Oh, the user hasn't submitted yet!: 아직 제출하지 않았습니다 _(:зゝ∠)
|
||||||
Oh, there is no task in the queue!: 대기열이 비었습니다.
|
|
||||||
Oh, there are no tasks that match the filter!: 결과 없음
|
Oh, there are no tasks that match the filter!: 결과 없음
|
||||||
|
Oh, there is no task in the queue!: 대기열이 비었습니다.
|
||||||
Ok: OK
|
Ok: OK
|
||||||
Only A-Z, a-z, 0-9 and _ are accepted: A-Z, a-z, 0-9 와 _만 허용됨
|
Only A-Z, a-z, 0-9 and _ are accepted: A-Z, a-z, 0-9 와 _만 허용됨
|
||||||
Oops, there are no results.: 결과 없음
|
Oops, there are no results.: 결과 없음
|
||||||
@@ -544,9 +544,9 @@ Quit Scratchpad: Editor 닫기
|
|||||||
Quote: 문구
|
Quote: 문구
|
||||||
Rank: 순위
|
Rank: 순위
|
||||||
ranking: 순위
|
ranking: 순위
|
||||||
|
Read all record codes: 모든 기록 코드 읽기
|
||||||
Read data of own problems: 자신의 문제 데이터 읽기
|
Read data of own problems: 자신의 문제 데이터 읽기
|
||||||
Read data of problem: 문제 데이터 읽기
|
Read data of problem: 문제 데이터 읽기
|
||||||
Read record codes: 점수 읽기
|
|
||||||
Ready (☆▽☆): 준비 완료! (☆▽☆)
|
Ready (☆▽☆): 준비 완료! (☆▽☆)
|
||||||
Ready: 준비됨
|
Ready: 준비됨
|
||||||
Recent {0} Records: 최근 {0} 점수
|
Recent {0} Records: 최근 {0} 점수
|
||||||
|
|||||||
@@ -351,9 +351,9 @@ QQ Group: QQ 群
|
|||||||
QQ Visibility: QQ 可見性
|
QQ Visibility: QQ 可見性
|
||||||
Quit Scratchpad: 退出線上程式設計模式
|
Quit Scratchpad: 退出線上程式設計模式
|
||||||
Rank: 排名
|
Rank: 排名
|
||||||
|
Read all record codes: 讀取所有記錄的程式碼
|
||||||
Read data of own problems: 讀取自己題目的資料
|
Read data of own problems: 讀取自己題目的資料
|
||||||
Read data of problem: 讀取題目資料
|
Read data of problem: 讀取題目資料
|
||||||
Read record codes: 讀取記錄的程式碼
|
|
||||||
Ready (☆▽☆): 馬上開始 (☆▽☆)
|
Ready (☆▽☆): 馬上開始 (☆▽☆)
|
||||||
Ready: 即將開始
|
Ready: 即將開始
|
||||||
Recent {0} Records: 最近 {0} 條記錄
|
Recent {0} Records: 最近 {0} 條記錄
|
||||||
|
|||||||
@@ -473,6 +473,7 @@ export class ContestEditHandler extends Handler {
|
|||||||
if (beginAtMoment.isSameOrAfter(endAt)) throw new ValidationError('duration');
|
if (beginAtMoment.isSameOrAfter(endAt)) throw new ValidationError('duration');
|
||||||
const beginAt = beginAtMoment.toDate();
|
const beginAt = beginAtMoment.toDate();
|
||||||
const lockAt = lock ? moment(endAt).add(-lock, 'minutes').toDate() : null;
|
const lockAt = lock ? moment(endAt).add(-lock, 'minutes').toDate() : null;
|
||||||
|
if (lockAt && contestDuration) throw new ValidationError('lockAt', 'duration');
|
||||||
await problem.getList(domainId, pids, this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || this.user._id, true);
|
await problem.getList(domainId, pids, this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || this.user._id, true);
|
||||||
if (tid) {
|
if (tid) {
|
||||||
await contest.edit(domainId, tid, {
|
await contest.edit(domainId, tid, {
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ class SystemUserImportHandler extends SystemHandler {
|
|||||||
groups[data.group].push(email);
|
groups[data.group].push(email);
|
||||||
}
|
}
|
||||||
if (data.school) payload.school = data.school;
|
if (data.school) payload.school = data.school;
|
||||||
|
if (data.studentId) payload.studentId = data.studentId;
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
udocs.push({
|
udocs.push({
|
||||||
email, username, password, displayName, payload,
|
email, username, password, displayName, payload,
|
||||||
|
|||||||
@@ -489,19 +489,12 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
|||||||
const langRange = (typeof this.pdoc.config === 'object' && this.pdoc.config.langs)
|
const langRange = (typeof this.pdoc.config === 'object' && this.pdoc.config.langs)
|
||||||
? Object.fromEntries(this.pdoc.config.langs.map((i) => [i, setting.langs[i]?.display || i]))
|
? Object.fromEntries(this.pdoc.config.langs.map((i) => [i, setting.langs[i]?.display || i]))
|
||||||
: setting.SETTINGS_BY_KEY.codeLang.range;
|
: setting.SETTINGS_BY_KEY.codeLang.range;
|
||||||
this.response.body = {
|
this.response.body.langRange = langRange;
|
||||||
langRange,
|
this.response.body.page_name = this.tdoc
|
||||||
pdoc: this.pdoc,
|
? this.tdoc.rule === 'homework'
|
||||||
udoc: this.udoc,
|
? 'homework_detail_problem_submit'
|
||||||
tdoc: this.tdoc,
|
: 'contest_detail_problem_submit'
|
||||||
tsdoc: this.tsdoc,
|
: 'problem_submit';
|
||||||
title: this.pdoc.title,
|
|
||||||
page_name: this.tdoc
|
|
||||||
? this.tdoc.rule === 'homework'
|
|
||||||
? 'homework_detail_problem_submit'
|
|
||||||
: 'contest_detail_problem_submit'
|
|
||||||
: 'problem_submit',
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@param('lang', Types.Name)
|
@param('lang', Types.Name)
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export const PERMS = [
|
|||||||
Permission('perm_problem', PERM.PERM_VIEW_PROBLEM_HIDDEN, 'View hidden problems'),
|
Permission('perm_problem', PERM.PERM_VIEW_PROBLEM_HIDDEN, 'View hidden problems'),
|
||||||
Permission('perm_problem', PERM.PERM_SUBMIT_PROBLEM, 'Submit problem'),
|
Permission('perm_problem', PERM.PERM_SUBMIT_PROBLEM, 'Submit problem'),
|
||||||
Permission('perm_problem', PERM.PERM_READ_PROBLEM_DATA, 'Read data of problem'),
|
Permission('perm_problem', PERM.PERM_READ_PROBLEM_DATA, 'Read data of problem'),
|
||||||
Permission('perm_record', PERM.PERM_READ_RECORD_CODE, 'Read record codes'),
|
Permission('perm_record', PERM.PERM_READ_RECORD_CODE, 'Read all record codes'),
|
||||||
Permission('perm_record', PERM.PERM_READ_RECORD_CODE_ACCEPT, 'Read record codes after accept'),
|
Permission('perm_record', PERM.PERM_READ_RECORD_CODE_ACCEPT, 'Read record codes after accept'),
|
||||||
Permission('perm_record', PERM.PERM_REJUDGE_PROBLEM, 'Rejudge problems'),
|
Permission('perm_record', PERM.PERM_REJUDGE_PROBLEM, 'Rejudge problems'),
|
||||||
Permission('perm_record', PERM.PERM_REJUDGE, 'Rejudge records'),
|
Permission('perm_record', PERM.PERM_REJUDGE, 'Rejudge records'),
|
||||||
|
|||||||
@@ -460,8 +460,8 @@ Numeric PID: 문제 번호
|
|||||||
Oh, the user doesn't have any contributions!: 아직 기여가 없습니다.
|
Oh, the user doesn't have any contributions!: 아직 기여가 없습니다.
|
||||||
Oh, the user hasn't created any discussions yet!: 아직 토론을 시작하지 않았습니다.
|
Oh, the user hasn't created any discussions yet!: 아직 토론을 시작하지 않았습니다.
|
||||||
Oh, the user hasn't submitted yet!: 아직 제출하지 않았습니다 _(:зゝ∠)
|
Oh, the user hasn't submitted yet!: 아직 제출하지 않았습니다 _(:зゝ∠)
|
||||||
Oh, there is no task in the queue!: 대기열이 비었습니다.
|
|
||||||
Oh, there are no tasks that match the filter!: 결과 없음
|
Oh, there are no tasks that match the filter!: 결과 없음
|
||||||
|
Oh, there is no task in the queue!: 대기열이 비었습니다.
|
||||||
Ok: OK
|
Ok: OK
|
||||||
Only A-Z, a-z, 0-9 and _ are accepted: A-Z, a-z, 0-9 와 _만 허용됨
|
Only A-Z, a-z, 0-9 and _ are accepted: A-Z, a-z, 0-9 와 _만 허용됨
|
||||||
Oops, there are no results.: 결과 없음
|
Oops, there are no results.: 결과 없음
|
||||||
@@ -547,9 +547,9 @@ Quit Scratchpad: Editor 닫기
|
|||||||
Quote: 문구
|
Quote: 문구
|
||||||
Rank: 순위
|
Rank: 순위
|
||||||
ranking: 순위
|
ranking: 순위
|
||||||
|
Read all record codes: 모든 기록 코드 읽기
|
||||||
Read data of own problems: 자신의 문제 데이터 읽기
|
Read data of own problems: 자신의 문제 데이터 읽기
|
||||||
Read data of problem: 문제 데이터 읽기
|
Read data of problem: 문제 데이터 읽기
|
||||||
Read record codes: 점수 읽기
|
|
||||||
Ready (☆▽☆): 준비 완료! (☆▽☆)
|
Ready (☆▽☆): 준비 완료! (☆▽☆)
|
||||||
Ready: 준비됨
|
Ready: 준비됨
|
||||||
Recent {0} Records: 최근 {0} 점수
|
Recent {0} Records: 최근 {0} 점수
|
||||||
|
|||||||
@@ -721,9 +721,9 @@ Quote: 引用
|
|||||||
Rank: 排名
|
Rank: 排名
|
||||||
Ranked Users: 排名用户
|
Ranked Users: 排名用户
|
||||||
ranking: 排名
|
ranking: 排名
|
||||||
|
Read all record codes: 读取所有记录的代码
|
||||||
Read data of own problems: 读取自己题目的数据
|
Read data of own problems: 读取自己题目的数据
|
||||||
Read data of problem: 读取题目数据
|
Read data of problem: 读取题目数据
|
||||||
Read record codes: 读取记录的代码
|
|
||||||
Ready (☆▽☆): 马上开始 (☆▽☆)
|
Ready (☆▽☆): 马上开始 (☆▽☆)
|
||||||
Ready: 即将开始
|
Ready: 即将开始
|
||||||
Recent {0} Records: 最近 {0} 条记录
|
Recent {0} Records: 最近 {0} 条记录
|
||||||
|
|||||||
@@ -352,9 +352,9 @@ QQ Group: QQ 群
|
|||||||
QQ Visibility: QQ 可見性
|
QQ Visibility: QQ 可見性
|
||||||
Quit Scratchpad: 退出線上程式設計模式
|
Quit Scratchpad: 退出線上程式設計模式
|
||||||
Rank: 排名
|
Rank: 排名
|
||||||
|
Read all record codes: 讀取所有記錄的程式碼
|
||||||
Read data of own problems: 讀取自己題目的資料
|
Read data of own problems: 讀取自己題目的資料
|
||||||
Read data of problem: 讀取題目資料
|
Read data of problem: 讀取題目資料
|
||||||
Read record codes: 讀取記錄的程式碼
|
|
||||||
Ready (☆▽☆): 馬上開始 (☆▽☆)
|
Ready (☆▽☆): 馬上開始 (☆▽☆)
|
||||||
Ready: 即將開始
|
Ready: 即將開始
|
||||||
Recent {0} Records: 最近 {0} 條記錄
|
Recent {0} Records: 最近 {0} 條記錄
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
value:tdoc.allowViewCode|default(true),
|
value:tdoc.allowViewCode|default(true),
|
||||||
row:false
|
row:false
|
||||||
}) }}
|
}) }}
|
||||||
<div style="display: none" class="contest-rule-settings contest-rule--acm contest-rule--ioi contest-rule--strictioi">
|
<div style="display: none" class="contest-rule-settings contest-rule--acm contest-rule--ioi">
|
||||||
{{ form.form_text({
|
{{ form.form_text({
|
||||||
columns:4,
|
columns:4,
|
||||||
label:'Lock (minutes)',
|
label:'Lock (minutes)',
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
row:false
|
row:false
|
||||||
}) }}
|
}) }}
|
||||||
</div>
|
</div>
|
||||||
<div style="display: none" class="contest-rule-settings contest-rule--oi">
|
<div style="display: none" class="contest-rule-settings contest-rule--oi contest-rule--ioi contest-rule--ledo contest-rule--strictioi">
|
||||||
{{ form.form_text({
|
{{ form.form_text({
|
||||||
columns:4,
|
columns:4,
|
||||||
label:'Flexable Duration',
|
label:'Flexable Duration',
|
||||||
|
|||||||
Reference in new issue
Block a user