现有 38 个成就全是累计量(通过几题、提交几次、连续几天),起步的人人都有、往上的够不着, 而且没有一个在说「你学会了什么」。连续打卡在这里结构上做不到:2025 秋学生最长连续交题 天数的中位数是 1 天,连续 7 天的只有 3 人。 - GET /me/knowledge:题数 ≥10 的知识点标签(10 个),每个给做对几道、档位、周一时的档位、 下一档门槛;四档 入门 1 / 会了 3 / 熟练 题数 40%(≤10)/ 精通 75%(≤20)。 回测 2025 秋:中位数学生一学期升 5 档;「入门」一档是给只做对一两道的 71 人加的 - 同班 ≥30% 点亮过的知识点才会出现在「还没碰过」里,免得 Python 班看到「C 语言」 - 个人主页加「我的知识点」,只在看自己时显示;首页一句话:本周升级 > 离下一档最近的 > 去点亮一个班里在学的,点了去按知识点筛的题目列表 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a63bf6ea07
commit
a7f6ebaf49
8 files changed
+446
No files matched your search
@@ -107,3 +107,36 @@ export type WeeklyRank = z.infer<typeof weeklyRankSchema>
|
||||
export type Metrics = z.infer<typeof metricsSchema>
|
||||
|
||||
export type PublicProfile = z.infer<typeof publicProfileSchema>
|
||||
|
||||
/**
|
||||
* 知识点地图:每个知识点做对了几道、在第几档。只给自己看(`/me/knowledge`),不出排名。
|
||||
*
|
||||
* 档位 0–4:0 没碰过、1 入门(做对 1 道)、2 会了(3 道)、3 熟练、4 精通,后两档的
|
||||
* 门槛按这个知识点的题量缩放(见 routes/account.ts 的 levelThresholds)。「入门」那一档
|
||||
* 是为「只做对一两道」的学生加的:2025 秋一学期一档都没升的 151 人里,71 人做对过带
|
||||
* 标签的题,只是没到 3 道,只看结果的档位设计下他们什么都看不到。
|
||||
*/
|
||||
export const knowledgeLevelSchema = z.object({
|
||||
name: z.string(),
|
||||
/** 这个知识点下公开的题库题数(不含比赛题) */
|
||||
problemCount: z.number().int(),
|
||||
solved: z.number().int(),
|
||||
level: z.number().int(),
|
||||
/** 本周一 0 点时的档位,和 level 不同就是「本周升级了」 */
|
||||
levelAtWeekStart: z.number().int(),
|
||||
/** 升到下一档要累计做对几道(总数,不是差值);已经是最高档为 null */
|
||||
nextAt: z.number().int().nullable(),
|
||||
})
|
||||
|
||||
export const knowledgeMapSchema = z.object({
|
||||
/** 题数 ≥ 10 的知识点,按题数从多到少 */
|
||||
tags: z.array(knowledgeLevelSchema),
|
||||
/**
|
||||
* 同班 30% 以上的同学点亮过的知识点。「还没碰过」只从这里挑 —— 不然学 Python 的班
|
||||
* 会看到「C 语言:还没碰过」。没有班级时为空。
|
||||
*/
|
||||
classTouched: z.array(z.string()),
|
||||
})
|
||||
|
||||
export type KnowledgeLevel = z.infer<typeof knowledgeLevelSchema>
|
||||
export type KnowledgeMap = z.infer<typeof knowledgeMapSchema>
|
||||
Reference in new issue
Block a user