feat(自学情况): 每个学生练一练做到哪了——格子分出做了一部分、点名字看逐题明细
- 方块格多一档「做了一部分」:按做对的比例从下往上涨绿,一道没做对的底下压一条橙; 鼠标停上去是「练一练 3/5,错了 4 次」 - 「练一练」列改成 做对/应做(应做 = 他打开过的课的练一练总数) - 点学生名字从右边滑出明细:每课一段,逐题写第几次做对、交了几次、最后错在哪; 手机上返回键关它 - 点开一道练一练,底下多一串「读了这课还没做」的人 - 顺手修:那个弹框七列加起来比弹框宽,「最后作答」被挤没了;改成一列用户名 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
859a537804
commit
7839a65f59
9 files changed
+647
-44
No files matched your search
@@ -654,6 +654,18 @@ export const learnBoardStudentSchema = z.object({
|
||||
opened: z.array(z.number().int()),
|
||||
done: z.array(z.number().int()),
|
||||
exerciseSolved: z.number().int(),
|
||||
/**
|
||||
* 碰过练一练的课,一课一项(一道没做的课不在里面)。方块格靠它分出「做了一部分」,
|
||||
* `wrongAttempts` 是这课所有练习错的次数加起来
|
||||
*/
|
||||
lessons: z.array(
|
||||
z.object({
|
||||
tutorialId: z.number().int(),
|
||||
tried: z.number().int(),
|
||||
solved: z.number().int(),
|
||||
wrongAttempts: z.number().int(),
|
||||
}),
|
||||
),
|
||||
totalSeconds: z.number().int(),
|
||||
lastViewedAt: z.string().nullable(),
|
||||
})
|
||||
@@ -712,6 +724,43 @@ export const learnExerciseAttemptSchema = z.object({
|
||||
lastAttemptAt: z.string(),
|
||||
})
|
||||
|
||||
export const learnExerciseAttemptListSchema = z.object({
|
||||
results: z.array(learnExerciseAttemptSchema),
|
||||
/** 打开过这一课、这道练习却一次没交的人 */
|
||||
untried: z.array(z.object({ userId: z.number().int(), username: z.string() })),
|
||||
})
|
||||
|
||||
/**
|
||||
* 一个学生的自学明细(点方块格里的名字):他碰过的每一课,每道练一练做到哪了。
|
||||
* 一课没碰过的不下发;练习没做过的 `attempts` 为 0、其余字段为空。
|
||||
*/
|
||||
export const learnStudentDetailSchema = z.object({
|
||||
userId: z.number().int(),
|
||||
username: z.string(),
|
||||
className: z.string().nullable(),
|
||||
lessons: z.array(
|
||||
z.object({
|
||||
tutorialId: z.number().int(),
|
||||
title: z.string(),
|
||||
viewCount: z.number().int(),
|
||||
totalSeconds: z.number().int(),
|
||||
lastViewedAt: z.string().nullable(),
|
||||
exercises: z.array(
|
||||
z.object({
|
||||
exerciseId: z.number().int(),
|
||||
type: exerciseTypeSchema,
|
||||
question: z.string(),
|
||||
attempts: z.number().int(),
|
||||
solved: z.boolean(),
|
||||
attemptsToSolve: z.number().int().nullable(),
|
||||
lastWrongAnswer: z.string().nullable(),
|
||||
lastAttemptAt: z.string().nullable(),
|
||||
}),
|
||||
),
|
||||
}),
|
||||
),
|
||||
})
|
||||
|
||||
export const generateFlowchartRequestSchema = z.object({
|
||||
python: z
|
||||
.string()
|
||||
@@ -1056,6 +1105,8 @@ export type LearnBoardStudent = z.infer<typeof learnBoardStudentSchema>
|
||||
export type LearnExerciseProgress = z.infer<typeof learnExerciseProgressSchema>
|
||||
export type LearnExerciseProgressList = z.infer<typeof learnExerciseProgressListSchema>
|
||||
export type LearnExerciseAttempt = z.infer<typeof learnExerciseAttemptSchema>
|
||||
export type LearnExerciseAttemptList = z.infer<typeof learnExerciseAttemptListSchema>
|
||||
export type LearnStudentDetail = z.infer<typeof learnStudentDetailSchema>
|
||||
|
||||
export type AdminTag = z.infer<typeof adminTagSchema>
|
||||
export type RenameTagResponse = z.infer<typeof renameTagResponseSchema>
|
||||
|
||||
Reference in new issue
Block a user