feat(vocab): enhance lesson state management and persistence in VocabLessonView
All checks were successful
Deploy to production / deploy (push) Successful in 3m20s

- Added a new JSONB field `lessonState` to the VocabCourseProgress model to store detailed lesson state information.
- Implemented methods in VocabService for sanitizing and serializing lesson state, ensuring robust data handling.
- Updated VocabLessonView to manage lesson state persistence, including local storage and server synchronization, improving user experience during vocabulary lessons.
- Introduced mechanisms for exporting and normalizing exercise answers, enhancing the accuracy of saved progress.
This commit is contained in:
Torsten Schulz (local)
2026-04-01 11:16:56 +02:00
parent 84adfeafb4
commit a3b820cea0
4 changed files with 505 additions and 12 deletions

View File

@@ -34,6 +34,12 @@ VocabCourseProgress.init({
allowNull: false,
defaultValue: 0
},
lessonState: {
type: DataTypes.JSONB,
allowNull: false,
defaultValue: {},
field: 'lesson_state'
},
lastAccessedAt: {
type: DataTypes.DATE,
allowNull: true,