feat(error-book): implement error book module with SM2 spaced repetition

- Add SM2 algorithm implementation with tests for spaced repetition review scheduling

- Add data-access, schema, types, and server actions for error book CRUD

- Add components: add dialog, class overview, filters, item card, stats cards, review buttons, top wrong questions

- Add error-book routes for admin, teacher, parent, and student roles

- Add i18n messages (en, zh-CN) for error book module
This commit is contained in:
SpecialX
2026-06-23 17:36:42 +08:00
parent 396c2c568d
commit bf056399c6
26 changed files with 3613 additions and 0 deletions

View File

@@ -0,0 +1,101 @@
{
"title": "Error Book",
"description": "Automatically collect wrong answers from exams and homework, review scientifically",
"stats": {
"total": "Total Errors",
"new": "New",
"learning": "Learning",
"mastered": "Mastered",
"dueReview": "Due Review",
"masteredRate": "Mastery Rate"
},
"status": {
"new": "New",
"learning": "Learning",
"mastered": "Mastered",
"archived": "Archived"
},
"source": {
"exam": "Exam",
"homework": "Homework",
"manual": "Manual"
},
"review": {
"again": "Again",
"hard": "Hard",
"good": "Good",
"easy": "Easy",
"againDesc": "Don't know, review tomorrow",
"hardDesc": "Barely correct, review in 2 days",
"goodDesc": "Correct, review in 4 days",
"easyDesc": "Easy, review in 7 days"
},
"actions": {
"add": "Add Manually",
"viewDetail": "View Details",
"saveNote": "Save Note",
"archive": "Archive",
"delete": "Delete",
"collect": "Collect Errors"
},
"fields": {
"question": "Select Question",
"note": "Study Note",
"errorTags": "Error Reason Tags",
"masteryLevel": "Mastery Level",
"reviewCount": "Review Count",
"nextReview": "Next Review",
"createdAt": "Added At"
},
"errorTags": {
"concept": "Concept Gap",
"calculation": "Calculation Error",
"careless": "Careless",
"misread": "Misread Question",
"method": "Wrong Method",
"memory": "Memory Error",
"time": "Out of Time"
},
"empty": {
"title": "Error book is empty",
"description": "Wrong answers from exams and homework will be collected here automatically. You can also add manually."
},
"teacher": {
"title": "Error Analysis",
"description": "View class error statistics and weak knowledge points",
"coverage": "Student Coverage",
"totalErrors": "Total Errors",
"avgMastery": "Avg Mastery Rate",
"weakPoints": "Weak Knowledge Points",
"subjectDist": "Subject Distribution",
"studentDetail": "Student Error Details",
"topWrong": "Top Wrong Questions",
"noClass": "No classes assigned",
"noStudent": "No students in class"
},
"parent": {
"title": "Child Error Book",
"description": "View your child's error statistics and learning progress",
"noChild": "No children linked"
},
"admin": {
"title": "School-wide Error Analysis",
"description": "School-wide error statistics and weak point analysis"
},
"messages": {
"added": "Error added",
"noteSaved": "Note saved",
"reviewRecorded": "Review recorded",
"archived": "Error archived",
"deleted": "Error deleted",
"collected": "Collected {{count}} errors",
"noNewErrors": "No new errors to collect",
"addFailed": "Failed to add error",
"saveFailed": "Save failed",
"deleteFailed": "Delete failed",
"archiveFailed": "Archive failed",
"collectFailed": "Failed to collect errors",
"notFound": "Error not found or access denied",
"selectQuestion": "Please select a question"
}
}

View File

@@ -0,0 +1,101 @@
{
"title": "错题本",
"description": "自动收录考试与作业中的错题,科学复习,攻克薄弱点",
"stats": {
"total": "错题总数",
"new": "待学习",
"learning": "学习中",
"mastered": "已掌握",
"dueReview": "待复习",
"masteredRate": "掌握率"
},
"status": {
"new": "待学习",
"learning": "学习中",
"mastered": "已掌握",
"archived": "已归档"
},
"source": {
"exam": "考试",
"homework": "作业",
"manual": "手动添加"
},
"review": {
"again": "重来",
"hard": "困难",
"good": "良好",
"easy": "简单",
"againDesc": "完全不会,明天再复习",
"hardDesc": "勉强答对2 天后复习",
"goodDesc": "正常答对4 天后复习",
"easyDesc": "轻松答对7 天后复习"
},
"actions": {
"add": "手动添加",
"viewDetail": "查看详情",
"saveNote": "保存笔记",
"archive": "归档",
"delete": "删除",
"collect": "采集错题"
},
"fields": {
"question": "选择题目",
"note": "学习笔记",
"errorTags": "错误原因标签",
"masteryLevel": "掌握度",
"reviewCount": "复习次数",
"nextReview": "下次复习",
"createdAt": "添加时间"
},
"errorTags": {
"concept": "概念不清",
"calculation": "计算错误",
"careless": "粗心大意",
"misread": "审题不清",
"method": "方法不当",
"memory": "记忆错误",
"time": "时间不足"
},
"empty": {
"title": "错题本为空",
"description": "完成考试或作业后,错题会自动收录到这里。你也可以手动添加错题。"
},
"teacher": {
"title": "错题分析",
"description": "查看班级学生的错题统计与薄弱知识点,辅助精准教学",
"coverage": "覆盖学生",
"totalErrors": "错题总数",
"avgMastery": "平均掌握率",
"weakPoints": "薄弱知识点",
"subjectDist": "学科错题分布",
"studentDetail": "学生错题详情",
"topWrong": "高频错题",
"noClass": "暂无可查看的班级",
"noStudent": "班级暂无学生"
},
"parent": {
"title": "子女错题本",
"description": "查看子女的错题情况与学习进度",
"noChild": "暂无子女关联"
},
"admin": {
"title": "全校错题分析",
"description": "全校错题统计与薄弱知识点分析,辅助教学决策"
},
"messages": {
"added": "错题已添加",
"noteSaved": "笔记已保存",
"reviewRecorded": "复习结果已记录",
"archived": "错题已归档",
"deleted": "错题已删除",
"collected": "已采集 {{count}} 道错题",
"noNewErrors": "没有新的错题需要采集",
"addFailed": "添加错题失败",
"saveFailed": "保存失败",
"deleteFailed": "删除失败",
"archiveFailed": "归档失败",
"collectFailed": "采集错题失败",
"notFound": "错题不存在或无权访问",
"selectQuestion": "请选择题目"
}
}