mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: allow homework add maintainer (#518)
This commit is contained in:
1 parent
809966fed3
commit
eb634dca69
8 files changed
+30
-16
No files matched your search
@@ -141,6 +141,7 @@ contest_detail_problem_submit: 대회 상세 문제 제출
|
||||
contest_edit: 대회 수정
|
||||
contest_main: 대회
|
||||
contest_scoreboard: 대회 점수판
|
||||
contest: 대회
|
||||
Contest: 대회
|
||||
Continue: 계속
|
||||
Contributed Problems: 기여한 문제
|
||||
|
||||
@@ -165,6 +165,7 @@ contest_manage: 比赛管理
|
||||
contest_problemlist: 题目列表
|
||||
contest_scoreboard: 比赛成绩表
|
||||
contest_user: 参赛者管理
|
||||
contest: 比赛
|
||||
Contest: 比赛
|
||||
Contests per page: 每页展示的比赛数量
|
||||
Continue: 继续
|
||||
|
||||
@@ -86,6 +86,7 @@ contest_detail_problem_submit: 遞交比賽程式碼
|
||||
contest_edit: 編輯比賽
|
||||
contest_main: 比賽
|
||||
contest_scoreboard: 比賽成績表
|
||||
contest: 比賽
|
||||
Contest: 比賽
|
||||
Create a contest: 創建一個比賽
|
||||
Create a Discussion: 創建一個討論
|
||||
|
||||
@@ -395,7 +395,7 @@ export class ContestEditHandler extends Handler {
|
||||
domainId: string, tid: ObjectID, beginAtDate: string, beginAtTime: string, duration: number,
|
||||
title: string, content: string, rule: string, _pids: string, rated = false,
|
||||
_code = '', autoHide = false, assign: string[] = null, lock: number = null,
|
||||
contestDuration: number = null, maintainer: number[] = null, allowViewCode = false,
|
||||
contestDuration: number = null, maintainer: number[] = [], allowViewCode = false,
|
||||
) {
|
||||
if (autoHide) this.checkPerm(PERM.PERM_EDIT_PROBLEM);
|
||||
const pids = _pids.replace(/,/g, ',').split(',').map((i) => +i).filter((i) => i);
|
||||
|
||||
@@ -154,12 +154,13 @@ class HomeworkEditHandler extends Handler {
|
||||
@param('content', Types.Content)
|
||||
@param('pids', Types.Content)
|
||||
@param('rated', Types.Boolean)
|
||||
@param('maintainer', Types.NumericArray, true)
|
||||
@param('assign', Types.CommaSeperatedArray, true)
|
||||
async postUpdate(
|
||||
domainId: string, tid: ObjectID, beginAtDate: string, beginAtTime: string,
|
||||
penaltySinceDate: string, penaltySinceTime: string, extensionDays: number,
|
||||
penaltyRules: PenaltyRules, title: string, content: string, _pids: string, rated = false,
|
||||
assign: string[] = [],
|
||||
maintainer: number[] = [], assign: string[] = [],
|
||||
) {
|
||||
const pids = _pids.replace(/,/g, ',').split(',').map((i) => +i).filter((i) => i);
|
||||
const tdoc = tid ? await contest.get(domainId, tid) : null;
|
||||
@@ -188,6 +189,7 @@ class HomeworkEditHandler extends Handler {
|
||||
penaltySince: penaltySince.toDate(),
|
||||
penaltyRules,
|
||||
rated,
|
||||
maintainer,
|
||||
assign,
|
||||
});
|
||||
if (tdoc.beginAt !== beginAt.toDate()
|
||||
|
||||
@@ -81,7 +81,7 @@ All Submissions: 所有递交
|
||||
All Training Plans: 所有训练计划
|
||||
All Users: 所有用户
|
||||
All: 全部
|
||||
Allow to maintain this contest: 允许管理此比赛
|
||||
Allow to maintain this {0}: 允许管理此{0}
|
||||
Allow user view others code after contest: 允许用户赛后查看其他人的代码
|
||||
Always granted all privileges: 总是拥有所有权限
|
||||
An error has occurred.: 发生了一个错误。
|
||||
@@ -406,6 +406,7 @@ home_preference: 偏好设置
|
||||
home_security: 安全设置
|
||||
homepage: 首页
|
||||
Homework Introduction: 作业介绍
|
||||
Homework Maintainer: 作业管理员
|
||||
Homework scoreboard is not visible.: 目前无法查看作业成绩表。
|
||||
homework_create: 创建作业
|
||||
homework_detail_problem_submit: 递交作业题目
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
columns:12,
|
||||
label:'Contest Maintainer',
|
||||
name:'maintainer',
|
||||
help_text:_('Allow to maintain this contest'),
|
||||
help_text:_('Allow to maintain this {0}').format(_('contest')),
|
||||
value:tdoc.maintainer|default('')
|
||||
}) }}
|
||||
<div class="row">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="section__body">
|
||||
<form method="post">
|
||||
{{ form.form_text({
|
||||
columns:8,
|
||||
columns:12,
|
||||
label:'Title',
|
||||
name:'title',
|
||||
placeholder:_('title'),
|
||||
@@ -15,7 +15,7 @@
|
||||
}) }}
|
||||
<div class="row">
|
||||
{{ form.form_text({
|
||||
columns:4,
|
||||
columns:3,
|
||||
label:'Begin Date',
|
||||
name:'beginAtDate',
|
||||
placeholder:'YYYY-mm-dd',
|
||||
@@ -24,8 +24,7 @@
|
||||
row:false
|
||||
}) }}
|
||||
{{ form.form_text({
|
||||
columns:4,
|
||||
last_column:true,
|
||||
columns:2,
|
||||
label:'Begin Time',
|
||||
name:'beginAtTime',
|
||||
placeholder:'HH:MM',
|
||||
@@ -33,9 +32,8 @@
|
||||
time:true,
|
||||
row:false
|
||||
}) }}
|
||||
</div><div class="row">
|
||||
{{ form.form_text({
|
||||
columns:4,
|
||||
columns:3,
|
||||
label:'End Date',
|
||||
name:'penaltySinceDate',
|
||||
placeholder:'YYYY-mm-dd',
|
||||
@@ -44,8 +42,7 @@
|
||||
row:false
|
||||
}) }}
|
||||
{{ form.form_text({
|
||||
columns:4,
|
||||
last_column:true,
|
||||
columns:2,
|
||||
label:'End Time',
|
||||
name:'penaltySinceTime',
|
||||
placeholder:'HH:MM',
|
||||
@@ -53,22 +50,33 @@
|
||||
time:true,
|
||||
row:false
|
||||
}) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form.form_text({
|
||||
row:false,
|
||||
columns:4,
|
||||
last_column:true,
|
||||
columns:2,
|
||||
label:'Extension (days)',
|
||||
name:'extensionDays',
|
||||
value:extensionDays
|
||||
}) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form.form_text({
|
||||
columns:4,
|
||||
row:false,
|
||||
columns:6,
|
||||
label:'Assign',
|
||||
name:'assign',
|
||||
placeholder:_('Group / UID'),
|
||||
value:tdoc.assign|default('')
|
||||
}) }}
|
||||
{{ form.form_text({
|
||||
row:false,
|
||||
last_column:true,
|
||||
columns:6,
|
||||
label:'Homework Maintainer',
|
||||
name:'maintainer',
|
||||
help_text:_('Allow to maintain this {0}').format(_('homework')),
|
||||
value:tdoc.maintainer|default('')
|
||||
}) }}
|
||||
</div>
|
||||
<div class="row"><div class="columns">
|
||||
<label>
|
||||
|
||||
Reference in new issue
Block a user