diff --git a/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue b/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue index 05f839b..cd8cdb8 100644 --- a/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue +++ b/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue @@ -543,6 +543,10 @@ export default { this.autoAdvanceTimer = null; } this.openParams = { languageId, chapterId, lessonId, courseId }; + // Debug: show how the dialog was opened (helps detect callers not setting srsMode) + try { + console.debug('[VocabPracticeDialog] open called with', { languageId, chapterId, lessonId, courseId, srsMode, hasInitialPool: Array.isArray(initialPool) }); + } catch (_) {} this.onClose = typeof onClose === 'function' ? onClose : null; this.srsMode = Boolean(srsMode); this.initialPool = Array.isArray(initialPool) ? initialPool : null; @@ -768,6 +772,11 @@ export default { let res = null; let courseDueRes = null; + // Debug: indicate reload start and current openParams + try { + console.debug('[VocabPracticeDialog] reloadPool start', { openParams: this.openParams, srsMode: this.srsMode }); + } catch (_) {} + // Wenn courseId vorhanden, frage kursweite fällige Items an (Server liefert totalDueCount). // Wir fragen das an, auch wenn gerade eine lessonId gesetzt ist, und nutzen es als Fallback // falls kein lesson-spezifischer Pool gefunden wird. (Ermöglicht Fallback von Lesson->Course SRS.) @@ -843,6 +852,10 @@ export default { this.pool = []; } finally { this.loading = false; + // Debug: report resolved pool and server due count + try { + console.debug('[VocabPracticeDialog] reloadPool finished', { poolLength: Array.isArray(this.pool) ? this.pool.length : 0, srsServerTotalDue: this.srsServerTotalDue, srsMode: this.srsMode }); + } catch (_) {} if (this.srsMode) { this.initSrsSessionFromPool(); }