3 Commits

Author SHA1 Message Date
wangdl
f1eb99b6fa fix(quiz): complete cross-platform attempt and question type contract
Some checks failed
Deploy API Server / build-and-unit (push) Failing after 42s
Deploy API Server / current-integration (push) Has been skipped
Deploy API Server / backward-compat (push) Has been skipped
Deploy API Server / deploy (push) Has been skipped
- Add attempt lifecycle with per-attempt answer visibility (#336)
- Add atomic submission with updateMany CAS + $transaction (#337)
- Add iOS attempt-based question loading + local answer cache (#338)
- Freeze choice/fill/judge cross-platform contract with fill grading (#339)
- Add per-question-type learning analysis accuracyByQuestionType (#340)
- Add GATE E2E test suite with 17 scenarios (#341)
- CLEANUP-01: Remove illegal type → choice silent degradation
- CLEANUP-02: Integrate QuizQuestionType enum into iOS quiz views
- CLEANUP-03: Test verification, git delivery, targeted gate review

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-24 19:55:05 +08:00
wangdl
c3b8919489 fix(M-AI-07-06): answer leak fixes (A3/A4) + state compatibility
Some checks failed
Deploy API Server / build-and-unit (push) Successful in 37s
Deploy API Server / current-integration (push) Successful in 30s
Deploy API Server / backward-compat (push) Successful in 0s
Deploy API Server / deploy (push) Failing after 49s
- getQuizQuestions: only return answer/explanation after user has submitted
- findOne: remove questions include (use getQuizQuestions instead)
- State mapping: lifecycleStatus compatible with legacy status field

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-22 20:51:03 +08:00
wangdl
6033fbc997 feat: H0-12 Quiz 模型与 API
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 11s
Prisma 新增:
- Quiz(测验)
- QuizQuestion(题目,支持 choice/fill/judge 三种题型)
- QuizAttempt(答题记录)
- QuizAnswer(作答详情)

API:
- POST /quizzes(生成测验,自动从KB知识点抽题)
- GET /quizzes(列表)
- GET /quizzes/:id(含题目)
- POST /quizzes/:id/start(开始答题)
- POST /quizzes/:id/submit(提交答案+评分)
- GET /quizzes/:id/results?attemptId=(结果详情)
- GET /quizzes/history/list(历史记录)

题目生成策略:
- 选择题:题干=知识点标题,选项=内容片段+其他知识点干扰项
- 填空题:随机关键词挖空
- 判断题:随机生成对/错陈述

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 20:03:40 +08:00