feat(提交列表): 老师也能重新判题;列表能按班级、一次按几道题筛,还带「通过几个测试点」
- 重新判题从只放超管改成老师及以上:前端一直给老师亮着按钮,点了只会「权限不足」 - /submissions、/flowcharts 加 className(user.class_name 精确匹配),题号可以一次填几道 - 列表每行带 caseSummary,口径和详情一致,在库里数完只回两个数 - 新增 GET /classroom/lesson:提交列表「这节课」按钮用,班级和题的取法同课堂看板 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b76a35b5f2
commit
ea480d5e0c
12 files changed
+151
-425
No files matched your search
@@ -171,3 +171,21 @@ export async function matchedUsers(username: string) {
|
||||
.from(schema.user)
|
||||
.where(ilike(schema.user.username, `%${username}%`))
|
||||
}
|
||||
|
||||
/**
|
||||
* 题号框允许一次填几道:`1001,1005,1010`。中英文逗号、空格、分号都当分隔符 ——
|
||||
* 老师在投影前手敲,不该因为打了个全角逗号就查不出来。
|
||||
*/
|
||||
export function parseDisplayIds(raw: string) {
|
||||
const seen = new Set<string>()
|
||||
const ids: string[] = []
|
||||
for (const part of raw.split(/[,,;;\s]+/)) {
|
||||
const id = part.trim()
|
||||
if (!id) continue
|
||||
const key = id.toLowerCase()
|
||||
if (seen.has(key)) continue
|
||||
seen.add(key)
|
||||
ids.push(id)
|
||||
}
|
||||
return ids
|
||||
}
|
||||
Reference in new issue
Block a user