feat(课堂看板): 标出最近几节课经常没交的学生,求助的学生置顶,点一下打开求助列表
Deploy / deploy (push) Canceled after 0s

2025 秋至少上过 5 节课的学生里,12.5% 七成以上的课一道都没交,37% 的学生贡献了
一半以上的「没交」;当堂那份「今天还没交过」把偶尔没来的和一直不动手的排在同一行。

- 看板接口给每个学生加 recentAttended:最近几节课(最多 5 节、不含今天、45 天内;
  一节课 = 同班同日 ≥5 人做同一题)里交过几节,另给 recentLessons
- 「今天还没交过」拆成「经常没交」(≥3 节可比且最多交过 1 节)和其他;表格加一列
  「最近 N 节」;只给老师看,投影模式不出现
- 求助读老师端常驻 WebSocket 的 collabStore.requests(不改后端):求助的学生置顶,
  状态显示「举手了 / 老师在帮」,点一下打开求助列表;求助提示不论布没布置题都显示

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-09-27 22:47:24 +08:00
1 parent 80106eaa04
commit a6bf845e06
3 files changed
+129 -6

No files matched your search

+7
View File
@@ -115,6 +115,8 @@ export const classBoardStudentSchema = z.object({
cells: z.array(classBoardCellSchema),
/** 今天最后一次提交(任何题),没交过为 null */
lastSubmitAt: z.string().nullable(),
/** 最近几节课(不含今天,个数见 ClassBoard.recentLessons)里交过题的有几节 */
recentAttended: z.number().int(),
})
/**
@@ -127,6 +129,11 @@ export const classBoardSchema = z.object({
source: z.enum(["teacher", "inferred"]).nullable(),
problems: z.array(classBoardProblemSchema),
students: z.array(classBoardStudentSchema),
/**
* 「最近几节课」一共几节(最多 5,不含今天)。一节课 = 这个班同学一起做题的一天
* (同班同一天 ≥ 5 人做同一道题,和「班里在做」同一个判据)。新班、开学头几周不满 5。
*/
recentLessons: z.number().int(),
})
export type ClassRankItem = z.infer<typeof classRankItemSchema>