feat: erweitere Vokabeltrainer um Unterstützung für Checkpoint-Lektionen und verbessere Übungsauswahl
All checks were successful
Deploy to production / deploy (push) Successful in 2m1s
All checks were successful
Deploy to production / deploy (push) Successful in 2m1s
This commit is contained in:
@@ -1390,11 +1390,12 @@ export default {
|
||||
}
|
||||
return core;
|
||||
},
|
||||
/** Für Wiederholungslektionen: Übungen aus vorherigen Lektionen (Kapitelprüfung). Sonst: eigene Grammatik-Übungen. */
|
||||
/** Für Wiederholungslektionen und Checkpoints: Übungen aus vorherigen Lektionen (Kapitelprüfung). Sonst: eigene Grammatik-Übungen. */
|
||||
effectiveExercises() {
|
||||
if (!this.lesson) return [];
|
||||
const isReview = ['review', 'vocab_review', 'weekly_review'].includes(this.lesson.lessonType);
|
||||
if (isReview && this.lesson.reviewVocabExercises && Array.isArray(this.lesson.reviewVocabExercises) && this.lesson.reviewVocabExercises.length > 0) {
|
||||
// Wenn die API bereits reviewVocabExercises liefert (z.B. für Wochenwiederholungen oder Checkpoints),
|
||||
// nutze diese explizit – sie enthalten die Kapitel-/Checkpoint-Übungen.
|
||||
if (this.lesson.reviewVocabExercises && Array.isArray(this.lesson.reviewVocabExercises) && this.lesson.reviewVocabExercises.length > 0) {
|
||||
return this.lesson.reviewVocabExercises;
|
||||
}
|
||||
if (this.lesson.grammarExercises && Array.isArray(this.lesson.grammarExercises)) {
|
||||
|
||||
Reference in New Issue
Block a user