- 后台课堂任务 admin/lesson → admin/task(/admin/task),和前台 oj/task 对上 - 后台首页 admin/setting/home.vue → admin/home/,设置 → admin/config/ - 卡点分析、年度趋势从 admin/problem 搬到 admin/analytics(/admin/analytics/stuck|trend),和菜单的「学情分析」、后端 analytics.ts 对上 - 首页 dashboard.vue / TeacherHome.vue → student.vue / teacher.vue;自学首页 home.vue → index.vue,看一课 index.vue → tutorial.vue - lesson 只表示课堂上的一节:自学那边改叫 tutorial(oj/learn/lesson.ts → utils.ts、isLessonDone → isTutorialDone、Lesson*.vue → Tutorial*.vue、自学情况的 lessons 字段 → tutorials) - 旧地址不留跳转 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
29c31640b5
commit
48590eee60
37 files changed
+1238
-1236
No files matched your search
@@ -675,7 +675,7 @@ const learnProblemStateSchema = z.object({
|
||||
* 「自学情况」的方块格:一个班的学生 × 这门课的每一课。
|
||||
*
|
||||
* **没打开过任何一课的学生也要有一行**(`opened` 为空)—— 页面上把他们收成一串名单,
|
||||
* 这张表首要回答的就是「谁还没开始」。`done` 是学完的课(练一练全对,见 `isLessonDone`),
|
||||
* 这张表首要回答的就是「谁还没开始」。`done` 是学完的课(练一练全对,见 `isTutorialDone`),
|
||||
* 一定也在 `opened` 里或者是没打开却把练一练做完了的(老链接直达练习的情况)。
|
||||
*/
|
||||
export const learnBoardStudentSchema = z.object({
|
||||
@@ -690,7 +690,7 @@ export const learnBoardStudentSchema = z.object({
|
||||
* 碰过练一练的课,一课一项(一道没做的课不在里面)。方块格靠它分出「做了一部分」,
|
||||
* `wrongAttempts` 是这课所有练习错的次数加起来
|
||||
*/
|
||||
lessons: z.array(
|
||||
tutorials: z.array(
|
||||
z.object({
|
||||
tutorialId: z.number().int(),
|
||||
tried: z.number().int(),
|
||||
@@ -774,7 +774,7 @@ export const learnStudentDetailSchema = z.object({
|
||||
userId: z.number().int(),
|
||||
username: z.string(),
|
||||
className: z.string().nullable(),
|
||||
lessons: z.array(
|
||||
tutorials: z.array(
|
||||
z.object({
|
||||
tutorialId: z.number().int(),
|
||||
title: z.string(),
|
||||
|
||||
@@ -191,7 +191,7 @@ export type ExerciseAttemptRequest = z.input<typeof exerciseAttemptRequestSchema
|
||||
*
|
||||
* 前端目录、首页、后台「自学情况」都走这一个函数,别各写一份。
|
||||
*/
|
||||
export function isLessonDone(progress: { viewCount: number; exerciseTotal: number; exerciseSolved: number }) {
|
||||
export function isTutorialDone(progress: { viewCount: number; exerciseTotal: number; exerciseSolved: number }) {
|
||||
if (progress.exerciseTotal > 0) return progress.exerciseSolved >= progress.exerciseTotal
|
||||
return progress.viewCount > 0
|
||||
}
|
||||
Reference in new issue
Block a user