Enhance VocabLessonView and VocabService for grammar exercise handling
- Added logic to initialize grammar exercises directly from lesson data or load them separately if not included. - Introduced a new method to initialize answer arrays for gap fill exercises, improving user interaction and response tracking. - Updated comments for clarity on the exercise loading process and initialization logic.
This commit is contained in:
@@ -853,6 +853,19 @@ export default class VocabService {
|
||||
{
|
||||
model: VocabCourse,
|
||||
as: 'course'
|
||||
},
|
||||
{
|
||||
model: VocabGrammarExercise,
|
||||
as: 'grammarExercises',
|
||||
include: [
|
||||
{
|
||||
model: VocabGrammarExerciseType,
|
||||
as: 'exerciseType'
|
||||
}
|
||||
],
|
||||
required: false,
|
||||
separate: true,
|
||||
order: [['exerciseNumber', 'ASC']]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user