diff --git a/packages/hydrooj/locales/ko.yaml b/packages/hydrooj/locales/ko.yaml index 1042d0a07..915019902 100644 --- a/packages/hydrooj/locales/ko.yaml +++ b/packages/hydrooj/locales/ko.yaml @@ -456,8 +456,8 @@ Numeric PID: 문제 번호 Oh, the user doesn't have any contributions!: 아직 기여가 없습니다. Oh, the user hasn't created any discussions 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 is no task in the queue!: 대기열이 비었습니다. Ok: OK Only A-Z, a-z, 0-9 and _ are accepted: A-Z, a-z, 0-9 와 _만 허용됨 Oops, there are no results.: 결과 없음 @@ -544,9 +544,9 @@ Quit Scratchpad: Editor 닫기 Quote: 문구 Rank: 순위 ranking: 순위 +Read all record codes: 모든 기록 코드 읽기 Read data of own problems: 자신의 문제 데이터 읽기 Read data of problem: 문제 데이터 읽기 -Read record codes: 점수 읽기 Ready (☆▽☆): 준비 완료! (☆▽☆) Ready: 준비됨 Recent {0} Records: 최근 {0} 점수 diff --git a/packages/hydrooj/locales/zh_TW.yaml b/packages/hydrooj/locales/zh_TW.yaml index 428b273a0..66a1cf301 100644 --- a/packages/hydrooj/locales/zh_TW.yaml +++ b/packages/hydrooj/locales/zh_TW.yaml @@ -351,9 +351,9 @@ QQ Group: QQ 群 QQ Visibility: QQ 可見性 Quit Scratchpad: 退出線上程式設計模式 Rank: 排名 +Read all record codes: 讀取所有記錄的程式碼 Read data of own problems: 讀取自己題目的資料 Read data of problem: 讀取題目資料 -Read record codes: 讀取記錄的程式碼 Ready (☆▽☆): 馬上開始 (☆▽☆) Ready: 即將開始 Recent {0} Records: 最近 {0} 條記錄 diff --git a/packages/hydrooj/src/handler/contest.ts b/packages/hydrooj/src/handler/contest.ts index 3cff5d741..7654b4583 100644 --- a/packages/hydrooj/src/handler/contest.ts +++ b/packages/hydrooj/src/handler/contest.ts @@ -473,6 +473,7 @@ export class ContestEditHandler extends Handler { if (beginAtMoment.isSameOrAfter(endAt)) throw new ValidationError('duration'); const beginAt = beginAtMoment.toDate(); 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); if (tid) { await contest.edit(domainId, tid, { diff --git a/packages/hydrooj/src/handler/manage.ts b/packages/hydrooj/src/handler/manage.ts index e26182926..a0c4d2133 100644 --- a/packages/hydrooj/src/handler/manage.ts +++ b/packages/hydrooj/src/handler/manage.ts @@ -254,6 +254,7 @@ class SystemUserImportHandler extends SystemHandler { groups[data.group].push(email); } if (data.school) payload.school = data.school; + if (data.studentId) payload.studentId = data.studentId; } catch (e) { } udocs.push({ email, username, password, displayName, payload, diff --git a/packages/hydrooj/src/handler/problem.ts b/packages/hydrooj/src/handler/problem.ts index 82c7f202c..15da911c1 100644 --- a/packages/hydrooj/src/handler/problem.ts +++ b/packages/hydrooj/src/handler/problem.ts @@ -489,19 +489,12 @@ export class ProblemSubmitHandler extends ProblemDetailHandler { 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])) : setting.SETTINGS_BY_KEY.codeLang.range; - this.response.body = { - langRange, - pdoc: this.pdoc, - udoc: this.udoc, - tdoc: this.tdoc, - tsdoc: this.tsdoc, - title: this.pdoc.title, - page_name: this.tdoc - ? this.tdoc.rule === 'homework' - ? 'homework_detail_problem_submit' - : 'contest_detail_problem_submit' - : 'problem_submit', - }; + this.response.body.langRange = langRange; + this.response.body.page_name = this.tdoc + ? this.tdoc.rule === 'homework' + ? 'homework_detail_problem_submit' + : 'contest_detail_problem_submit' + : 'problem_submit'; } @param('lang', Types.Name) diff --git a/packages/hydrooj/src/model/builtin.ts b/packages/hydrooj/src/model/builtin.ts index 8066689bd..991dda915 100644 --- a/packages/hydrooj/src/model/builtin.ts +++ b/packages/hydrooj/src/model/builtin.ts @@ -114,7 +114,7 @@ export const PERMS = [ 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_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_REJUDGE_PROBLEM, 'Rejudge problems'), Permission('perm_record', PERM.PERM_REJUDGE, 'Rejudge records'), diff --git a/packages/ui-default/locales/ko.yaml b/packages/ui-default/locales/ko.yaml index 8fdb15766..44f8693c0 100644 --- a/packages/ui-default/locales/ko.yaml +++ b/packages/ui-default/locales/ko.yaml @@ -460,8 +460,8 @@ Numeric PID: 문제 번호 Oh, the user doesn't have any contributions!: 아직 기여가 없습니다. Oh, the user hasn't created any discussions 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 is no task in the queue!: 대기열이 비었습니다. Ok: OK Only A-Z, a-z, 0-9 and _ are accepted: A-Z, a-z, 0-9 와 _만 허용됨 Oops, there are no results.: 결과 없음 @@ -547,9 +547,9 @@ Quit Scratchpad: Editor 닫기 Quote: 문구 Rank: 순위 ranking: 순위 +Read all record codes: 모든 기록 코드 읽기 Read data of own problems: 자신의 문제 데이터 읽기 Read data of problem: 문제 데이터 읽기 -Read record codes: 점수 읽기 Ready (☆▽☆): 준비 완료! (☆▽☆) Ready: 준비됨 Recent {0} Records: 최근 {0} 점수 diff --git a/packages/ui-default/locales/zh.yaml b/packages/ui-default/locales/zh.yaml index 2f04e03cb..3e21a4554 100644 --- a/packages/ui-default/locales/zh.yaml +++ b/packages/ui-default/locales/zh.yaml @@ -721,9 +721,9 @@ Quote: 引用 Rank: 排名 Ranked Users: 排名用户 ranking: 排名 +Read all record codes: 读取所有记录的代码 Read data of own problems: 读取自己题目的数据 Read data of problem: 读取题目数据 -Read record codes: 读取记录的代码 Ready (☆▽☆): 马上开始 (☆▽☆) Ready: 即将开始 Recent {0} Records: 最近 {0} 条记录 diff --git a/packages/ui-default/locales/zh_TW.yaml b/packages/ui-default/locales/zh_TW.yaml index 4de90c16e..1c04a70c4 100644 --- a/packages/ui-default/locales/zh_TW.yaml +++ b/packages/ui-default/locales/zh_TW.yaml @@ -352,9 +352,9 @@ QQ Group: QQ 群 QQ Visibility: QQ 可見性 Quit Scratchpad: 退出線上程式設計模式 Rank: 排名 +Read all record codes: 讀取所有記錄的程式碼 Read data of own problems: 讀取自己題目的資料 Read data of problem: 讀取題目資料 -Read record codes: 讀取記錄的程式碼 Ready (☆▽☆): 馬上開始 (☆▽☆) Ready: 即將開始 Recent {0} Records: 最近 {0} 條記錄 diff --git a/packages/ui-default/templates/contest_edit.html b/packages/ui-default/templates/contest_edit.html index 084a536d0..ebf3a1760 100644 --- a/packages/ui-default/templates/contest_edit.html +++ b/packages/ui-default/templates/contest_edit.html @@ -158,7 +158,7 @@ value:tdoc.allowViewCode|default(true), row:false }) }} -