From 7499491ae822b7e62a05387684553b0629de2588 Mon Sep 17 00:00:00 2001 From: Eugenius Naumenko Date: Wed, 11 Nov 2026 17:51:32 +0000 Subject: [PATCH] =?UTF-8?q?Thematische=20Lernwege=20im=20A1-Kurs=20standar?= =?UTF-8?q?dm=C3=A4=C3=9Fig=20empfehlen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die bisherige Auswahl verbindet Lernbereiche nicht thematisch und kann freies Sprechen ohne passende Vorbereitung anbieten. Der Bankbetrieb empfiehlt nun 60 redaktionell verknüpfte Themen in sechs Lernmodulen: Hören, Wortschatz, Lesen, Nachsprechen, Grammatik, angeleitetes und freies Schreiben, freies Sprechen. Speichert die Lernwegposition getrennt von Leistungsnachweisen. Unbeantwortete Schritte bleiben empfohlen und sind explizit überspringbar; nach einer tatsächlich bewerteten schwachen Antwort gibt es höchstens eine Wiederholung ohne Notensperre. Bereichswahl, Muttersprache, historische Aufgaben und A1-Tests bleiben unabhängig. Deutsch und Russisch zeigen Thema und Schritt; vorhandene Aufgabeninhalte und Bewertungen werden nicht umgeschrieben. Keine zusätzlichen Modellaufrufe. Validierung: Go-Race-Suite mit eigener lokaler PostgreSQL-Testdatenbank, go vet, Web-Build, Bank-/Varianten-/Sequenzaudits und lokale Kurs-/Sprachen-/Admin-Smokes. Regressionsfall: passendes Schreiben vor freiem Sprechen über zwei Freunde. Keine Live-Anbieterprüfung oder Produktionsänderung. --- AGENTS.md | 6 + README.md | 32 +- apps/api/internal/domain/adaptive.go | 33 +- apps/api/internal/domain/course_sequences.go | 29 + apps/api/internal/httpapi/adaptive.go | 24 +- .../internal/httpapi/ai_integration_test.go | 1 + .../course_sequences_integration_test.go | 195 + apps/api/internal/store/adaptive_jobs.go | 10 +- apps/api/internal/store/course_bank.go | 20 +- apps/api/internal/store/course_sequences.go | 288 ++ .../internal/store/course_sequences_test.go | 63 + .../coursebank/en-US/a1-v2/manifest.json | 2 +- .../store/coursebank/sequence_manifest.json | 3 + .../internal/store/coursebank/sequences.json | 3326 +++++++++++++++++ apps/web/src/api/adaptive.ts | 6 +- apps/web/src/i18n/de-DE.json | 19 +- apps/web/src/i18n/ru-RU.json | 19 +- apps/web/src/pages/CoursePage.tsx | 24 +- apps/web/tests/README.md | 10 + apps/web/tests/course-sequences.e2e.cjs | 48 + docs/AI_OPERATIONS.md | 13 +- docs/data-model.md | 28 + tools/course_bank/audit.py | 3 + tools/course_bank/build.py | 3 + tools/course_bank/review.json | 4 +- tools/course_bank/sequence_review.json | 30 + tools/course_bank/sequence_sources.json | 1237 ++++++ tools/course_bank/sequences.py | 56 + 28 files changed, 5489 insertions(+), 43 deletions(-) create mode 100644 apps/api/internal/domain/course_sequences.go create mode 100644 apps/api/internal/services/course_sequences_integration_test.go create mode 100644 apps/api/internal/store/course_sequences.go create mode 100644 apps/api/internal/store/course_sequences_test.go create mode 100644 apps/api/internal/store/coursebank/sequence_manifest.json create mode 100644 apps/api/internal/store/coursebank/sequences.json create mode 100644 apps/web/tests/course-sequences.e2e.cjs create mode 100644 tools/course_bank/sequence_review.json create mode 100644 tools/course_bank/sequence_sources.json create mode 100644 tools/course_bank/sequences.py diff --git a/AGENTS.md b/AGENTS.md index f7084b8..8a71eb2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -88,6 +88,12 @@ die aktuellen Daten, bevor du Aussagen aus älteren Dokumenten übernimmst. 42 Kombinationen aus Modul und Lernbereich mit jeweils 20 Aufgaben. - Diese Bestandsgröße ist eine überprüfbare Eigenschaft der aktuellen Bank, keine Einschränkung zukünftiger Sprachen oder Erweiterungen. +- Im Bankbetrieb ist die thematische Lernsequenz die Standardempfehlung in den + sechs Lernmodulen: Hören und Wortschatz früh, freies Sprechen nach passender + Vorbereitung. Redaktionelle Verknüpfungen liegen getrennt von Aufgabeninhalten. +- Lernwegposition und übersprungene Schritte sind keine Leistungsnachweise. + Bereiche bleiben direkt wählbar; keine Mindestnote als Zugangssperre einführen. + Lernwege und ihre Wiederholungen verändern weder historische Aufgaben noch Tests. - Unterstützte Darstellungen: `choice`, `short_text`, `free_text`, `repeat_sentence` und `free_speech`. - Hör- und Lesematerial sowie Lösungsschlüssel nur entsprechend der diff --git a/README.md b/README.md index c9082e4..242f1ae 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,37 @@ Auswahlantworten bewertet die Go-API anhand des gespeicherten Lösungsschlüssel ## A1-Kurs -Der Menüpunkt **A1-Kurs** öffnet sieben frei wählbare Module mit Grammatik, Wortschatz, Hören, Lesen, Sprechen und Schreiben. **Nächste Aufgabe** wählt aus dem geprüften Bestand: noch nicht gezeigte Aufgaben zuerst, bei belegtem Lernbedarf passende Lernziele, nach Ausschöpfen des Bereichs Wiederholungen. Schwierigkeit und Wiederholung beruhen auf tatsächlich bewerteten Antworten. Auch bereits gezeigte, noch unbeantwortete Aufgaben zählen als gesehen, nicht als Leistungsnachweis. Im Browser stehen Herkunft und verbleibender Bestand. +Der Menüpunkt **A1-Kurs** öffnet sieben frei wählbare Module mit Grammatik, +Wortschatz, Hören, Lesen, Sprechen und Schreiben. Im Bankbetrieb ist der +**Empfohlene Lernweg** der Standard: 60 redaktionell verknüpfte Themen, zehn in +jedem der sechs Lernmodule. Jede Folge beginnt mit Hören und führt über +Wortschatz, Lesen, Nachsprechen, passende Grammatik und kurze Schreibaufgaben +zum freien Schreiben und erst danach zum freien Sprechen über dasselbe Thema. +Vorlagen und eigene Angaben dürfen unterschiedlich sein; es geht um übertragbare +Wörter und Satzmuster, nicht um das Auswendiglernen eines Lösungssatzes. + +**Nächste Aufgabe** setzt den gespeicherten Lernweg fort. Eine unbeantwortete +Aufgabe bleibt der aktuelle Schritt; **Diesen Schritt überspringen** geht +bewusst weiter. Nach einem bereits bewerteten Fehler unter 80 Punkten wird pro +Schritt höchstens eine Wiederholung empfohlen. Eine weitere Antwort oder +explizites Überspringen setzt den Weg ohne Mindestnote fort. Gespeicherte +unbenotete Antworten zählen als Bearbeitung, niemals als Beherrschung. +Demoantworten und bloßes Klicken auf „Nächste Aufgabe“ zählen nicht als Bearbeitung. + +Die Oberfläche zeigt Thema und Schritt auf Deutsch beziehungsweise Russisch. +Neuladen, ein Modulwechsel und der Wechsel der Muttersprache erhalten den Lernweg. +Die sechs Lernbereiche bleiben direkt auswählbar und verändern den Lernweg nicht. +Dabei, nach Abschluss des Lernwegs und bei der Wiederholung im siebten Modul +bleibt die bisherige Auswahl nach ungesehenen Aufgaben, tatsächlichen Bewertungen +und Wiederholungen verfügbar. Der A1-Test verwendet seine eigene eingefrorene +Auswahl; weder Lernwege noch Überspringen verändern Testnoten oder Lösungen. + +Die Verknüpfungen liegen separat in `tools/course_bank/sequence_sources.json`, +mit eigenem Prüfvermerk in `sequence_review.json`. Build und Audit berücksichtigen +sie automatisch. Bestehende Aufgaben-IDs, Aufgabeninhalte, Messungen und Bewertungen +bleiben unverändert. Es gibt keinen zusätzlichen Modellaufruf und noch keinen +Button „Grammatik erklären“. Der alternative KI-Kursmodus behält seine eigene +Planung. Die redaktionelle Codex-Durchsicht ist keine unabhängige Lehrkräfteprüfung. Die 840 Aufgaben liegen in 42 versionierten JSON-Dateien unter `apps/api/internal/store/coursebank/en-US/a1-v2/`. Ihre redaktionellen Quellen und der an Dateiprüfsummen gebundene Prüfvermerk liegen unter `tools/course_bank/`. Es gibt 560 Auswahlaufgaben, je 70 kurze und freie Schreibaufgaben sowie je 70 Nachsprech- und freie Sprechaufgaben. Hörtexte bleiben bis zur zulässigen Freigabe privat. Alte Reserven bleiben für den deutschen Bestand und den alternativen KI-Modus erhalten; fehlende muttersprachliche Bankvarianten werden nicht dadurch ersetzt. diff --git a/apps/api/internal/domain/adaptive.go b/apps/api/internal/domain/adaptive.go index df33b42..28f5263 100644 --- a/apps/api/internal/domain/adaptive.go +++ b/apps/api/internal/domain/adaptive.go @@ -156,22 +156,23 @@ type CourseBrief struct { Reason string `json:"reason"` } type CourseJob struct { - InstructionLanguage string `json:"instruction_language"` - AIRevision int `json:"-"` - ID string `json:"id"` - UserID string `json:"-"` - Language string `json:"target_language"` - Kind string `json:"kind"` - ModuleID string `json:"module_id"` - Skill string `json:"skill,omitempty"` - SubjectID string `json:"subject_id,omitempty"` - Status string `json:"status"` - Stage string `json:"stage"` - TaskID string `json:"task_id,omitempty"` - Source string `json:"source,omitempty"` - Review bool `json:"review,omitempty"` - Error string `json:"error,omitempty"` - Lease string `json:"-"` + Recommendation *SequenceRecommendation `json:"recommendation,omitempty"` + InstructionLanguage string `json:"instruction_language"` + AIRevision int `json:"-"` + ID string `json:"id"` + UserID string `json:"-"` + Language string `json:"target_language"` + Kind string `json:"kind"` + ModuleID string `json:"module_id"` + Skill string `json:"skill,omitempty"` + SubjectID string `json:"subject_id,omitempty"` + Status string `json:"status"` + Stage string `json:"stage"` + TaskID string `json:"task_id,omitempty"` + Source string `json:"source,omitempty"` + Review bool `json:"review,omitempty"` + Error string `json:"error,omitempty"` + Lease string `json:"-"` } type AdaptiveExam struct { PreparationJobID string `json:"preparation_job_id,omitempty"` diff --git a/apps/api/internal/domain/course_sequences.go b/apps/api/internal/domain/course_sequences.go new file mode 100644 index 0000000..9fabed8 --- /dev/null +++ b/apps/api/internal/domain/course_sequences.go @@ -0,0 +1,29 @@ +package domain + +// Learning sequences link immutable tasks; they do not redefine their answers or +// turn a submitted/ungraded answer into evidence of mastery. +type LearningSequence struct { + ID string `json:"id"` + ModuleID string `json:"module_id"` + Titles map[string]string `json:"titles"` + Steps []LearningSequenceStep `json:"steps"` +} +type LearningSequenceStep struct { + Phase string `json:"phase"` + BankEntryID string `json:"bank_entry_id"` +} +type SequenceRecommendation struct { + Review bool `json:"review"` + NeedsAnswer bool `json:"needs_answer"` + Revision string `json:"revision"` + SequenceID string `json:"sequence_id,omitempty"` + Title string `json:"title,omitempty"` + Phase string `json:"phase,omitempty"` + Step int `json:"step"` + Steps int `json:"steps"` + Topic int `json:"topic"` + Topics int `json:"topics"` + TaskID string `json:"task_id,omitempty"` + Complete bool `json:"complete"` + SkippedSteps int `json:"skipped_steps"` +} diff --git a/apps/api/internal/httpapi/adaptive.go b/apps/api/internal/httpapi/adaptive.go index 1492872..ed37969 100644 --- a/apps/api/internal/httpapi/adaptive.go +++ b/apps/api/internal/httpapi/adaptive.go @@ -124,7 +124,20 @@ func (s *Server) adaptiveCatalog(w http.ResponseWriter, r *http.Request) { adaptiveError(w, err) return } - writeJSON(w, 200, map[string]any{"native_language": user.ExplanationLanguage(), "native_languages": []string{"de-DE", "ru-RU"}, "instruction_language": user.ExplanationLanguage(), "instruction_languages": instructionLanguages, "exam_available": s.course.Mode != "bank" || bankExamInventoryAvailable(inventory), "task_mode": s.course.Mode, "grading_available": s.course.EvaluationAvailable(r.Context()), "bank": inventory, "analysis_job": analysisJob, "profile": p, "modules": snap.Modules, "progress": snap.Progress, "analysis": snap.PreviousAnalysis, "facts_version": snap.FactsVersion, "enabled_languages": available, "languages": languages, "exams": exams}) + recommendations := map[string]*domain.SequenceRecommendation{} + if s.course.Mode == "bank" { + for _, module := range snap.Modules { + recommendation, err := s.course.Repo.SequenceRecommendation(r.Context(), user.ID, p.TargetLanguage, module.ID, user.ExplanationLanguage()) + if err != nil { + adaptiveError(w, err) + return + } + if recommendation != nil { + recommendations[module.ID] = recommendation + } + } + } + writeJSON(w, 200, map[string]any{"sequence_recommendations": recommendations, "native_language": user.ExplanationLanguage(), "native_languages": []string{"de-DE", "ru-RU"}, "instruction_language": user.ExplanationLanguage(), "instruction_languages": instructionLanguages, "exam_available": s.course.Mode != "bank" || bankExamInventoryAvailable(inventory), "task_mode": s.course.Mode, "grading_available": s.course.EvaluationAvailable(r.Context()), "bank": inventory, "analysis_job": analysisJob, "profile": p, "modules": snap.Modules, "progress": snap.Progress, "analysis": snap.PreviousAnalysis, "facts_version": snap.FactsVersion, "enabled_languages": available, "languages": languages, "exams": exams}) } func (s *Server) adaptiveNext(w http.ResponseWriter, r *http.Request) { p, ok := s.adaptiveProfile(w, r) @@ -132,13 +145,14 @@ func (s *Server) adaptiveNext(w http.ResponseWriter, r *http.Request) { return } var input struct { - RequestID string `json:"request_id"` - Skill string `json:"skill"` + RequestID string `json:"request_id"` + SkipTaskID string `json:"skip_task_id"` + Skill string `json:"skill"` } if !adaptiveJSON(w, r, &input) { return } - if !courseRequestIDPattern.MatchString(input.RequestID) || !validCourseSkill(input.Skill) { + if !courseRequestIDPattern.MatchString(input.RequestID) || !validCourseSkill(input.Skill) || (input.SkipTaskID != "" && (input.Skill != "" || len(input.SkipTaskID) > 120 || s.course.Mode != "bank")) { writeError(w, 400, errors.New("invalid request ID or skill")) return } @@ -146,7 +160,7 @@ func (s *Server) adaptiveNext(w http.ResponseWriter, r *http.Request) { adaptiveError(w, err) return } - j, err := s.course.Repo.Enqueue(r.Context(), currentUserID(r), p.TargetLanguage, "next", r.PathValue("id"), input.Skill, "", input.RequestID) + j, err := s.course.Repo.Enqueue(r.Context(), currentUserID(r), p.TargetLanguage, "next", r.PathValue("id"), input.Skill, input.SkipTaskID, input.RequestID) if err != nil { adaptiveError(w, err) return diff --git a/apps/api/internal/httpapi/ai_integration_test.go b/apps/api/internal/httpapi/ai_integration_test.go index a0219cf..26aab8c 100644 --- a/apps/api/internal/httpapi/ai_integration_test.go +++ b/apps/api/internal/httpapi/ai_integration_test.go @@ -405,6 +405,7 @@ func TestBankBrowserSmoke(t *testing.T) { for _, check := range []struct{ script, language string }{ {"tests/languages.e2e.cjs", "de-DE"}, {"tests/course-variants.e2e.cjs", "ru-RU"}, + {"tests/course-sequences.e2e.cjs", "de-DE"}, {"tests/course-bank.e2e.cjs", "de-DE"}, {"tests/course-bank.e2e.cjs", "ru-RU"}, } { diff --git a/apps/api/internal/services/course_sequences_integration_test.go b/apps/api/internal/services/course_sequences_integration_test.go new file mode 100644 index 0000000..d9ea48b --- /dev/null +++ b/apps/api/internal/services/course_sequences_integration_test.go @@ -0,0 +1,195 @@ +package services + +import ( + "bytes" + "context" + "testing" + + "speech-learning-api/internal/domain" + "speech-learning-api/internal/store" +) + +func TestThematicLearningPathAndFrozenProgress(t *testing.T) { + for _, native := range []string{"de-DE", "ru-RU"} { + t.Run(native, func(t *testing.T) { + db, profiles := adaptiveTestDB(t) + ctx := context.Background() + user, err := profiles.CreateUser(ctx, store.NewID("sequence")+"@example.test", "hash", native) + if err != nil { + t.Fatal(err) + } + if _, err = profiles.CreateLearnerProfile(ctx, user.ID, "en-US", "A1", 17); err != nil { + t.Fatal(err) + } + engine := NewCourseEngine(store.NewAdaptiveStore(db), profiles, nil, nil) + engine.Mode = "bank" + module := "a1_introductions_v1" + requests := map[string]string{} + run := func(skill, skip string) (domain.AdaptiveTask, domain.CourseJob) { + t.Helper() + request := store.NewID("sequence-request") + job, err := engine.Repo.Enqueue(ctx, user.ID, "en-US", "next", module, skill, skip, request) + if err != nil { + t.Fatal(err) + } + job, err = engine.Repo.Claim(ctx) + if err != nil { + t.Fatal(err) + } + task, err := engine.Process(ctx, job) + if err != nil { + t.Fatal(err) + } + if err = engine.Repo.Finish(ctx, job, task, ""); err != nil { + t.Fatal(err) + } + saved, err := engine.Repo.Job(ctx, user.ID, "en-US", job.ID) + if err != nil { + t.Fatal(err) + } + requests[saved.ID] = request + return *task, saved + } + answer := func(task domain.AdaptiveTask, correct bool) domain.AdaptiveAttempt { + t.Helper() + text := task.AnswerKey.ReferenceAnswer + if task.Kind == "choice" { + text = task.AnswerKey.CorrectOptionID + if !correct { + for _, o := range task.Options { + if o.ID != text { + text = o.ID + break + } + } + } + } + var speech *domain.PronunciationResult + if task.Skill == "speaking" { + speech = &domain.PronunciationResult{Provider: "azure", RecognizedText: text, OverallScore: 90} + } + attempt, _, err := engine.Submit(ctx, user.ID, "en-US", task.ID, store.NewID("sequence-answer"), text, speech) + if err != nil { + t.Fatal(err) + } + return attempt + } + first, job := run("", "") + if first.Skill != "listening" || first.InstructionLanguage != native || job.Recommendation == nil || job.Recommendation.Step != 1 { + t.Fatal(first, job) + } + var frozen []byte + if err = db.QueryRowContext(ctx, `SELECT data FROM course_v2_tasks WHERE id=$1`, first.ID).Scan(&frozen); err != nil { + t.Fatal(err) + } + again, _ := run("", "") + if again.ID != first.ID { + t.Fatal("unanswered step silently bypassed") + } + // A graded mistake offers one bounded review, even with an unchanged task ID. + answer(first, false) + repeated, reviewJob := run("", "") + if repeated.ID != first.ID || !reviewJob.Recommendation.Review { + t.Fatal("missing bounded review", reviewJob) + } + blocked, _ := run("", "") + if blocked.ID != first.ID { + t.Fatal("old answer passed the new review") + } + answer(repeated, false) + next, nextJob := run("", "") + if next.ID == first.ID || nextJob.Recommendation.Step != 2 { + t.Fatal("grade became a permanent gate", nextJob) + } + // Manual free speaking remains available and never moves the thematic cursor. + before, _ := engine.Repo.SequenceRecommendation(ctx, user.ID, "en-US", module, native) + manual, _ := run("speaking", "") + if manual.Skill != "speaking" { + t.Fatal(manual) + } + after, _ := engine.Repo.SequenceRecommendation(ctx, user.ID, "en-US", module, native) + if before.Step != after.Step || before.SequenceID != after.SequenceID { + t.Fatal("manual choice moved path") + } + // Explicit skipping is separate from evidence and replaying a request is stable. + skipped, skipJob := run("", next.ID) + if skipJob.Recommendation.SkippedSteps != 1 || skipJob.Recommendation.Step != 3 { + t.Fatal(skipJob) + } + replayed, err := engine.Repo.Enqueue(ctx, user.ID, "en-US", "next", module, "", next.ID, requests[skipJob.ID]) + if err != nil || replayed.TaskID != skipped.ID || replayed.Recommendation.Step != 3 { + t.Fatal("request replay advanced path", err) + } + + wrong, err := engine.Repo.Enqueue(ctx, user.ID, "en-US", "next", module, "", "another-users-task", store.NewID("skip-other")) + if err != nil { + t.Fatal(err) + } + wrong, err = engine.Repo.Claim(ctx) + if err != nil { + t.Fatal(err) + } + if _, err = engine.Process(ctx, wrong); err == nil { + t.Fatal("stale/foreign skip accepted") + } + if err = engine.Repo.Finish(ctx, wrong, nil, "expected conflict"); err != nil { + t.Fatal(err) + } + // Changing native language preserves the thematic position and frozen content. + other := "de-DE" + if native == other { + other = "ru-RU" + } + if _, err = profiles.UpdatePreferences(ctx, user.ID, other, "", "", 0); err != nil { + t.Fatal(err) + } + changed, err := engine.Repo.SequenceRecommendation(ctx, user.ID, "en-US", module, other) + if err != nil || changed.Step != 3 || changed.SkippedSteps != 1 || changed.Title == before.Title { + t.Fatal(changed, err) + } + if err = profiles.Init(ctx); err != nil { + t.Fatal(err) + } + var current []byte + if err = db.QueryRowContext(ctx, `SELECT data FROM course_v2_tasks WHERE id=$1`, first.ID).Scan(¤t); err != nil { + t.Fatal(err) + } + if !bytes.Equal(frozen, current) { + t.Fatal("frozen task edited") + } + + // Finish the path through the reported two-friends speaking task. Every free + // speech task follows a submitted, matching free-writing task, not a score gate. + task := skipped + seenCompose := map[string]bool{} + foundFriends := false + for n := 0; n < 110; n++ { + if task.Kind == "free_speech" { + key := task.AnswerKey.ReferenceAnswer + if !seenCompose[key] { + t.Fatal("speaking without related writing", task.CanonicalTaskID) + } + if task.CanonicalTaskID == "a1bank_en_v2_introductions_speaking_14" { + foundFriends = true + break + } + } + attempt := answer(task, true) + if task.Kind == "free_text" { + if attempt.Status != "ungraded" { + t.Fatal("missing model fabricated a writing grade", attempt) + } + seenCompose[task.AnswerKey.ReferenceAnswer] = true + } + task, _ = run("", "") + } + if !foundFriends { + t.Fatal("two-friends sequence was not reached") + } + var calls int + if err = db.QueryRowContext(ctx, `SELECT count(*) FROM ai_calls`).Scan(&calls); err != nil || calls != 0 { + t.Fatal("sequence spent model budget", calls, err) + } + }) + } +} diff --git a/apps/api/internal/store/adaptive_jobs.go b/apps/api/internal/store/adaptive_jobs.go index b3558bc..65eb176 100644 --- a/apps/api/internal/store/adaptive_jobs.go +++ b/apps/api/internal/store/adaptive_jobs.go @@ -37,14 +37,16 @@ func scanCourseJob(row interface{ Scan(...any) error }) (domain.CourseJob, error } if len(result) > 0 { var r struct { - TaskID string `json:"task_id"` - Source string `json:"source"` - Review bool `json:"review"` + TaskID string `json:"task_id"` + Recommendation *domain.SequenceRecommendation `json:"recommendation"` + Source string `json:"source"` + Review bool `json:"review"` } if err = json.Unmarshal(result, &r); err != nil { return j, err } j.TaskID = r.TaskID + j.Recommendation = r.Recommendation j.Source = r.Source j.Review = r.Review } @@ -91,7 +93,7 @@ func (s *AdaptiveStore) Finish(ctx context.Context, j domain.CourseJob, task *do if failure != "" { status = "failed" } - _, err := s.db.ExecContext(ctx, `UPDATE course_v2_jobs SET status=$3,stage=$3,result=COALESCE($4,result),error=$5,lease_until=NULL WHERE id=$1 AND lease=$2 AND status='running'`, j.ID, j.Lease, status, result, failure) + _, err := s.db.ExecContext(ctx, `UPDATE course_v2_jobs SET status=$3,stage=$3,result=COALESCE(result,'{}'::jsonb)||COALESCE($4,'{}'::jsonb),error=$5,lease_until=NULL WHERE id=$1 AND lease=$2 AND status='running'`, j.ID, j.Lease, status, result, failure) return err } func (s *AdaptiveStore) RetryEvaluation(ctx context.Context, user, language, attemptID string) (domain.CourseJob, error) { diff --git a/apps/api/internal/store/course_bank.go b/apps/api/internal/store/course_bank.go index c6db4b5..0c6cfcd 100644 --- a/apps/api/internal/store/course_bank.go +++ b/apps/api/internal/store/course_bank.go @@ -171,7 +171,10 @@ func (s *AdaptiveStore) InstallBank(ctx context.Context) error { if err != nil { return err } - if _, err = s.db.ExecContext(ctx, bankSchema); err != nil { + if _, err = bundledSequences(); err != nil { + return err + } + if _, err = s.db.ExecContext(ctx, bankSchema+sequenceSchema); err != nil { return err } tx, err := s.db.BeginTx(ctx, nil) @@ -375,7 +378,11 @@ func (s *AdaptiveStore) AssignBankTask(ctx context.Context, j domain.CourseJob) hb := sha256.Sum256([]byte(j.UserID + b.entry.ID)) return strings.Compare(hex.EncodeToString(ha[:]), hex.EncodeToString(hb[:])) < 0 }) - chosen := candidates[0] + selection, index, err := selectSequence(ctx, tx, j, candidates) + if err != nil { + return domain.AdaptiveTask{}, err + } + chosen := candidates[index] t := chosen.entry.Task t.Source = "curated" t.Review = chosen.seen @@ -403,7 +410,14 @@ func (s *AdaptiveStore) AssignBankTask(ctx context.Context, j domain.CourseJob) if err != nil { return domain.AdaptiveTask{}, err } - data, _ := json.Marshal(map[string]any{"task_id": t.ID, "source": "curated", "review": chosen.seen}) + if err = saveSequenceSelection(ctx, tx, j, selection, t.ID); err != nil { + return domain.AdaptiveTask{}, err + } + var recommendation *domain.SequenceRecommendation + if selection != nil { + recommendation = selection.Recommendation + } + data, _ := json.Marshal(map[string]any{"task_id": t.ID, "source": "curated", "review": chosen.seen, "recommendation": recommendation}) if _, err = tx.ExecContext(ctx, `UPDATE course_v2_jobs SET result=$2 WHERE id=$1`, j.ID, data); err != nil { return domain.AdaptiveTask{}, err } diff --git a/apps/api/internal/store/course_sequences.go b/apps/api/internal/store/course_sequences.go new file mode 100644 index 0000000..fb1711d --- /dev/null +++ b/apps/api/internal/store/course_sequences.go @@ -0,0 +1,288 @@ +package store + +import ( + "context" + "crypto/sha256" + "database/sql" + _ "embed" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "sync" + + "speech-learning-api/internal/domain" +) + +//go:embed coursebank/sequences.json +var sequenceData []byte + +//go:embed coursebank/sequence_manifest.json +var sequenceManifest []byte + +const sequenceSchema = ` +CREATE TABLE IF NOT EXISTS course_v2_sequence_progress ( + user_id TEXT NOT NULL REFERENCES users(id),language TEXT NOT NULL,version TEXT NOT NULL, + module_id TEXT NOT NULL,revision TEXT NOT NULL,cursor INT NOT NULL DEFAULT 0 CHECK(cursor>=0), + active_task_id TEXT REFERENCES course_v2_tasks(id),presented_at TIMESTAMPTZ, + skipped_steps INT NOT NULL DEFAULT 0 CHECK(skipped_steps>=0), + reviewed BOOLEAN NOT NULL DEFAULT false, + PRIMARY KEY(user_id,language,version,module_id,revision)); +ALTER TABLE course_v2_sequence_progress ADD COLUMN IF NOT EXISTS reviewed BOOLEAN NOT NULL DEFAULT false; +` + +type sequencePack struct { + Revision string `json:"revision"` + Review string `json:"editorial_review_sha256"` + Sequences []domain.LearningSequence `json:"sequences"` +} + +var sequencesOnce sync.Once +var sequencesPack sequencePack +var sequencesError error + +func bundledSequences() (sequencePack, error) { + sequencesOnce.Do(func() { + var manifest struct { + SHA string `json:"sha256"` + } + if sequencesError = json.Unmarshal(sequenceManifest, &manifest); sequencesError != nil { + return + } + sum := sha256.Sum256(sequenceData) + if hex.EncodeToString(sum[:]) != manifest.SHA { + sequencesError = errors.New("sequence checksum mismatch") + return + } + if sequencesError = json.Unmarshal(sequenceData, &sequencesPack); sequencesError != nil { + return + } + base, err := BundledBank() + if err != nil { + sequencesError = err + return + } + sequencesError = validateSequences(sequencesPack, base) + }) + return sequencesPack, sequencesError +} +func validateSequences(pack sequencePack, base []domain.BankEntry) error { + if pack.Revision == "" || len(pack.Review) != 64 || len(pack.Sequences) == 0 { + return errors.New("missing sequence review") + } + entries := map[string]domain.BankEntry{} + for _, entry := range base { + entries[entry.ID] = entry + } + seen := map[string]bool{} + phases := []string{"listen", "vocabulary", "read", "repeat", "grammar", "write", "compose", "speak"} + kinds := []string{"choice", "choice", "choice", "repeat_sentence", "choice", "short_text", "free_text", "free_speech"} + skills := []string{"listening", "vocabulary", "reading", "speaking", "grammar", "writing", "writing", "speaking"} + for _, seq := range pack.Sequences { + if seq.ID == "" || seen[seq.ID] || seq.Titles["de-DE"] == "" || seq.Titles["ru-RU"] == "" { + return fmt.Errorf("invalid sequence: %s", seq.ID) + } + seen[seq.ID] = true + phase := -1 + for _, step := range seq.Steps { + entry, ok := entries[step.BankEntryID] + next := phase + if next < 0 || step.Phase != phases[next] { + next++ + } + if next >= len(phases) || step.Phase != phases[next] || !ok || entry.Task.ModuleID != seq.ModuleID || entry.Task.Kind != kinds[next] || entry.Task.Skill != skills[next] { + return fmt.Errorf("invalid sequence step: %s/%s", seq.ID, step.BankEntryID) + } + phase = next + } + if phase != len(phases)-1 { + return fmt.Errorf("incomplete sequence: %s", seq.ID) + } + last := seq.Steps[len(seq.Steps)-1] + previous := seq.Steps[len(seq.Steps)-2] + if entries[last.BankEntryID].Task.AnswerKey.ReferenceAnswer != entries[previous.BankEntryID].Task.AnswerKey.ReferenceAnswer { + return fmt.Errorf("unrelated final writing/speech: %s", seq.ID) + } + } + return nil +} + +type sequencePosition struct { + Sequence domain.LearningSequence + Step domain.LearningSequenceStep + StepIndex int + TopicIndex int + Topics int +} + +func sequencePositions(pack sequencePack, module string) []sequencePosition { + out := []sequencePosition{} + topics := 0 + for _, seq := range pack.Sequences { + if seq.ModuleID == module { + topics++ + } + } + topic := 0 + for _, seq := range pack.Sequences { + if seq.ModuleID != module { + continue + } + for n, step := range seq.Steps { + out = append(out, sequencePosition{seq, step, n, topic, topics}) + } + topic++ + } + return out +} +func recommendationAt(pack sequencePack, positions []sequencePosition, cursor, skipped int, task, native string) *domain.SequenceRecommendation { + r := &domain.SequenceRecommendation{Revision: pack.Revision, Complete: cursor >= len(positions), SkippedSteps: skipped} + if r.Complete { + return r + } + pos := positions[cursor] + r.SequenceID = pos.Sequence.ID + r.Title = pos.Sequence.Titles[native] + r.Phase = pos.Step.Phase + r.Step = pos.StepIndex + 1 + r.Steps = len(pos.Sequence.Steps) + r.Topic = pos.TopicIndex + 1 + r.Topics = pos.Topics + r.TaskID = task + return r +} + +// This cursor records participation/explicit skipping, never success. It is +// independent of native language, variant and grades. Exams never use it. +func (s *AdaptiveStore) SequenceRecommendation(ctx context.Context, user, language, module, native string) (*domain.SequenceRecommendation, error) { + if language != "en-US" { + return nil, nil + } + pack, err := bundledSequences() + if err != nil { + return nil, err + } + positions := sequencePositions(pack, module) + if len(positions) == 0 { + return nil, nil + } + var cursor, skipped int + var reviewed bool + var task string + err = s.db.QueryRowContext(ctx, `SELECT cursor,skipped_steps,COALESCE(active_task_id,''),reviewed FROM course_v2_sequence_progress WHERE user_id=$1 AND language=$2 AND version=$3 AND module_id=$4 AND revision=$5`, user, language, domain.CourseVersion, module, pack.Revision).Scan(&cursor, &skipped, &task, &reviewed) + if err != nil && !errors.Is(err, sql.ErrNoRows) { + return nil, err + } + r := recommendationAt(pack, positions, cursor, skipped, task, native) + r.Review = reviewed + if task != "" && !r.Complete { + answered, err := sequenceAnswered(ctx, s.db, domain.CourseJob{UserID: user, Language: language, ModuleID: module}, pack.Revision) + if err != nil { + return nil, err + } + r.NeedsAnswer = !answered + } + return r, nil +} + +type sequenceSelection struct { + Reset bool + Reviewed bool + Cursor int + Skipped int + Recommendation *domain.SequenceRecommendation +} + +func selectSequence(ctx context.Context, tx *sql.Tx, j domain.CourseJob, candidates []bankCandidate) (*sequenceSelection, int, error) { + if j.Language != "en-US" || j.Skill != "" || j.Kind != "next" { + return nil, 0, nil + } + pack, err := bundledSequences() + if err != nil { + return nil, 0, err + } + positions := sequencePositions(pack, j.ModuleID) + if len(positions) == 0 { + if j.SubjectID != "" { + return nil, 0, ErrCourseConflict + } + return nil, 0, nil + } + _, err = tx.ExecContext(ctx, `INSERT INTO course_v2_sequence_progress(user_id,language,version,module_id,revision) VALUES($1,$2,$3,$4,$5) ON CONFLICT DO NOTHING`, j.UserID, j.Language, domain.CourseVersion, j.ModuleID, pack.Revision) + if err != nil { + return nil, 0, err + } + var cursor, skipped int + var reviewed bool + reset := false + var active string + err = tx.QueryRowContext(ctx, `SELECT cursor,skipped_steps,COALESCE(active_task_id,''),reviewed FROM course_v2_sequence_progress WHERE user_id=$1 AND language=$2 AND version=$3 AND module_id=$4 AND revision=$5 FOR UPDATE`, j.UserID, j.Language, domain.CourseVersion, j.ModuleID, pack.Revision).Scan(&cursor, &skipped, &active, &reviewed) + if err != nil { + return nil, 0, err + } + if j.SubjectID != "" && (j.SubjectID != active || cursor >= len(positions)) { + return nil, 0, ErrCourseConflict + } + if cursor < len(positions) && active != "" { + answered, err := sequenceAnswered(ctx, tx, j, pack.Revision) + if err != nil { + return nil, 0, err + } + if answered && !reviewed && j.SubjectID == "" { + // One optional review after an actually graded mistake. No pass mark + // gates the path; a second answer or explicit skip continues it. + var weak bool + err = tx.QueryRowContext(ctx, `SELECT COALESCE((SELECT a.status='graded' AND (a.evaluation->>'score')::float8<80 FROM course_v2_attempts a JOIN course_v2_sequence_progress p ON p.active_task_id=a.task_id WHERE p.user_id=$1 AND p.language=$2 AND p.version=$3 AND p.module_id=$4 AND p.revision=$5 AND a.user_id=$1 AND NOT a.demo AND a.exam_id IS NULL AND a.created_at>=p.presented_at ORDER BY a.created_at DESC,a.id DESC LIMIT 1),false)`, j.UserID, j.Language, domain.CourseVersion, j.ModuleID, pack.Revision).Scan(&weak) + if err != nil { + return nil, 0, err + } + if weak { + reviewed = true + reset = true + answered = false + } + } + if answered || j.SubjectID != "" { + cursor++ + reviewed = false + reset = true + if !answered { + skipped++ + } + active = "" + } + } + r := recommendationAt(pack, positions, cursor, skipped, active, j.InstructionLanguage) + r.Review = reviewed + selection := &sequenceSelection{Cursor: cursor, Skipped: skipped, Recommendation: r, Reviewed: reviewed, Reset: reset} + if r.Complete { + return selection, 0, nil + } + for n, candidate := range candidates { + if candidate.bankEntryID == positions[cursor].Step.BankEntryID { + return selection, n, nil + } + } + return nil, 0, ErrCourseVariantUnavailable +} +func saveSequenceSelection(ctx context.Context, tx *sql.Tx, j domain.CourseJob, selection *sequenceSelection, taskID string) error { + if selection == nil { + return nil + } + r := selection.Recommendation + if r.Complete { + taskID = "" + } + r.TaskID = taskID + r.NeedsAnswer = taskID != "" + _, err := tx.ExecContext(ctx, `UPDATE course_v2_sequence_progress SET cursor=$6,skipped_steps=$7,presented_at=CASE WHEN $9 OR active_task_id IS DISTINCT FROM NULLIF($8,'') THEN now() ELSE presented_at END,active_task_id=NULLIF($8,''),reviewed=$10 WHERE user_id=$1 AND language=$2 AND version=$3 AND module_id=$4 AND revision=$5`, j.UserID, j.Language, domain.CourseVersion, j.ModuleID, r.Revision, selection.Cursor, selection.Skipped, taskID, selection.Reset, selection.Reviewed) + return err +} + +func sequenceAnswered(ctx context.Context, db interface { + QueryRowContext(context.Context, string, ...any) *sql.Row +}, j domain.CourseJob, revision string) (bool, error) { + var answered bool + err := db.QueryRowContext(ctx, `SELECT EXISTS(SELECT 1 FROM course_v2_attempts a JOIN course_v2_sequence_progress p ON p.active_task_id=a.task_id WHERE p.user_id=$1 AND p.language=$2 AND p.version=$3 AND p.module_id=$4 AND p.revision=$5 AND a.user_id=$1 AND a.exam_id IS NULL AND NOT a.demo AND a.status IN ('graded','ungraded','pending') AND a.created_at>=p.presented_at)`, j.UserID, j.Language, domain.CourseVersion, j.ModuleID, revision).Scan(&answered) + return answered, err +} diff --git a/apps/api/internal/store/course_sequences_test.go b/apps/api/internal/store/course_sequences_test.go new file mode 100644 index 0000000..b1ef643 --- /dev/null +++ b/apps/api/internal/store/course_sequences_test.go @@ -0,0 +1,63 @@ +package store + +import ( + "encoding/json" + "testing" +) + +func TestReviewedSequencesProtectPreparation(t *testing.T) { + pack, err := bundledSequences() + if err != nil { + t.Fatal(err) + } + base, err := BundledBank() + if err != nil { + t.Fatal(err) + } + if len(pack.Sequences) != 60 { + t.Fatal(len(pack.Sequences)) + } + copyPack := func() sequencePack { + raw, _ := json.Marshal(pack) + var copy sequencePack + if err := json.Unmarshal(raw, ©); err != nil { + t.Fatal(err) + } + return copy + } + t.Run("no free speech first", func(t *testing.T) { + copy := copyPack() + copy.Sequences[0].Steps[0] = copy.Sequences[0].Steps[len(copy.Sequences[0].Steps)-1] + if validateSequences(copy, base) == nil { + t.Fatal("unprepared speaking accepted") + } + }) + t.Run("no unrelated writing at the end", func(t *testing.T) { + copy := copyPack() + n := len(copy.Sequences[0].Steps) + other := copy.Sequences[1] + copy.Sequences[0].Steps[n-2] = other.Steps[len(other.Steps)-2] + if validateSequences(copy, base) == nil { + t.Fatal("unrelated writing accepted") + } + }) + t.Run("both native titles required", func(t *testing.T) { + copy := copyPack() + delete(copy.Sequences[0].Titles, "ru-RU") + if validateSequences(copy, base) == nil { + t.Fatal("missing Russian topic accepted") + } + }) + for _, module := range []string{"introductions", "family", "numbers_time", "daily_life", "food_shopping", "home_city"} { + positions := sequencePositions(pack, "a1_"+module+"_v1") + if len(positions) == 0 || positions[0].Step.Phase != "listen" { + t.Fatal("no listening entry", module) + } + for _, native := range []string{"de-DE", "ru-RU"} { + r := recommendationAt(pack, positions, 0, 0, "", native) + if r.Topic != 1 || r.Topics != 10 || r.Title == "" || r.Complete { + t.Fatal(r) + } + } + } +} diff --git a/apps/api/internal/store/coursebank/en-US/a1-v2/manifest.json b/apps/api/internal/store/coursebank/en-US/a1-v2/manifest.json index 5dbc654..119321d 100644 --- a/apps/api/internal/store/coursebank/en-US/a1-v2/manifest.json +++ b/apps/api/internal/store/coursebank/en-US/a1-v2/manifest.json @@ -1,7 +1,7 @@ { "revision": "en-A1-bank-v2", "total": 840, - "editorial_review_sha256": "a64cc0b862192e996265420c7e6d8ac82c3543449c97fbdd99dc816a270e141a", + "editorial_review_sha256": "6018e163c0e4a79dd12828c368db42c4382398be51f0c70c3343ba512278a42d", "files": { "introductions.grammar.json": "e166492fa3e9e13760620bda1af2c0bb6472d91216a4c46808360264450c5ebc", "introductions.vocabulary.json": "d72c534e3c7422d85b2aa03f2988b77da31163637c70ac511ca07f278d1fdd81", diff --git a/apps/api/internal/store/coursebank/sequence_manifest.json b/apps/api/internal/store/coursebank/sequence_manifest.json new file mode 100644 index 0000000..b0382c7 --- /dev/null +++ b/apps/api/internal/store/coursebank/sequence_manifest.json @@ -0,0 +1,3 @@ +{ + "sha256": "808b5b14d40eeee0d4cd47f584532e71c6bbb1a9c090d0166fd055861213efa8" +} diff --git a/apps/api/internal/store/coursebank/sequences.json b/apps/api/internal/store/coursebank/sequences.json new file mode 100644 index 0000000..6c574b5 --- /dev/null +++ b/apps/api/internal/store/coursebank/sequences.json @@ -0,0 +1,3326 @@ +{ + "revision": "thematic-A1-v1", + "editorial_review_sha256": "324686f3d9d33eac46063cca2530feae3cf4f8337d9b4f73a700b38bd70f5727", + "sequences": [ + { + "id": "introductions_scene_13", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Name und Nachname", + "ru-RU": "Имя и фамилия" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_02" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_12" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_13" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_06" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_04" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_13" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_13" + } + ] + }, + { + "id": "introductions_scene_11", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Herkunft nennen", + "ru-RU": "Откуда я" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_03" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_09" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_11" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_11" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_12" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_02" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_11" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_11" + } + ] + }, + { + "id": "introductions_scene_20", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Herkunft und Wohnort", + "ru-RU": "Происхождение и место жительства" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_20" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_03" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_10" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_16" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_20" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_07" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_20" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_20" + } + ] + }, + { + "id": "introductions_scene_12", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Eine Person vorstellen", + "ru-RU": "Представляем человека" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_12" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_10" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_16" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_12" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_02" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_13" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_02" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_12" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_12" + } + ] + }, + { + "id": "introductions_scene_15", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Eine Freundin vorstellen", + "ru-RU": "Представляем подругу" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_15" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_06" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_16" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_15" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_03" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_07" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_15" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_15" + } + ] + }, + { + "id": "introductions_scene_14", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Zwei Freunde und ihre Sprache", + "ru-RU": "Два друга и их язык" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_06" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_18" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_14" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_03" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_10" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_08" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_14" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_14" + } + ] + }, + { + "id": "introductions_scene_16", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Herkunft und Sprachen einer Gruppe", + "ru-RU": "Откуда мы и на каких языках говорим" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_16" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_09" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_18" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_16" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_06" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_10" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_06" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_08" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_16" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_16" + } + ] + }, + { + "id": "introductions_scene_17", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Name und Wohnort verbinden", + "ru-RU": "Имя и место жительства" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_10" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_16" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_17" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_05" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_06" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_09" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_17" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_17" + } + ] + }, + { + "id": "introductions_scene_18", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Sich in einer Gruppe vorstellen", + "ru-RU": "Знакомство в группе" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_01" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_15" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_18" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_10" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_18" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_18" + } + ] + }, + { + "id": "introductions_scene_19", + "module_id": "a1_introductions_v1", + "titles": { + "de-DE": "Name und Rufname", + "ru-RU": "Имя и как меня называют" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_introductions_listening_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_02" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_introductions_vocabulary_12" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_introductions_reading_19" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_introductions_speaking_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_introductions_grammar_06" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_introductions_writing_09" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_introductions_writing_19" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_introductions_speaking_19" + } + ] + }, + { + "id": "family_scene_11", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Ein Kind vorstellen", + "ru-RU": "Представляем ребёнка" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_06" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_07" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_08" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_11" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_11" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_11" + } + ] + }, + { + "id": "family_scene_12", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Aussehen eines Familienmitglieds", + "ru-RU": "Внешность члена семьи" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_12" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_04" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_20" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_12" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_15" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_03" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_12" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_12" + } + ] + }, + { + "id": "family_scene_13", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Geschwister und Hobbys", + "ru-RU": "Братья, сёстры и увлечения" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_03" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_13" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_08" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_02" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_13" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_13" + } + ] + }, + { + "id": "family_scene_14", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Großeltern und ihr Zuhause", + "ru-RU": "Бабушка, дедушка и их дом" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_10" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_14" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_17" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_14" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_14" + } + ] + }, + { + "id": "family_scene_15", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Name und Alter eines Kindes", + "ru-RU": "Имя и возраст ребёнка" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_15" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_07" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_19" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_15" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_16" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_02" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_15" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_15" + } + ] + }, + { + "id": "family_scene_16", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Ein Kind und seine Schule", + "ru-RU": "Ребёнок и его школа" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_16" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_08" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_16" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_16" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_16" + } + ] + }, + { + "id": "family_scene_17", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Eine Partnerin vorstellen", + "ru-RU": "Представляем супругу" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_16" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_17" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_03" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_17" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_17" + } + ] + }, + { + "id": "family_scene_18", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Einen Partner vorstellen", + "ru-RU": "Представляем супруга" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_17" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_18" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_04" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_18" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_18" + } + ] + }, + { + "id": "family_scene_19", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Geschwister im Plural", + "ru-RU": "Братья и сёстры во множественном числе" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_03" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_14" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_19" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_02" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_13" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_02" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_19" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_19" + } + ] + }, + { + "id": "family_scene_20", + "module_id": "a1_family_v1", + "titles": { + "de-DE": "Familie und Haustier", + "ru-RU": "Семья и домашний питомец" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_family_listening_20" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_family_vocabulary_15" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_family_reading_20" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_05" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_family_speaking_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_family_grammar_19" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_family_writing_07" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_family_writing_20" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_family_speaking_20" + } + ] + }, + { + "id": "numbers_time_scene_11", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Datum und Beginn einer Feier", + "ru-RU": "Дата и начало праздника" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_16" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_14" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_11" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_03" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_12" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_18" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_11" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_11" + } + ] + }, + { + "id": "numbers_time_scene_12", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Aufstehen und Losgehen", + "ru-RU": "Подъём и выход из дома" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_12" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_17" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_12" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_10" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_02" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_12" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_12" + } + ] + }, + { + "id": "numbers_time_scene_13", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Personen zählen", + "ru-RU": "Считаем людей" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_02" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_04" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_13" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_17" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_13" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_13" + } + ] + }, + { + "id": "numbers_time_scene_14", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Monat und Dauer eines Urlaubs", + "ru-RU": "Месяц и длительность отпуска" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_08" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_14" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_18" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_03" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_14" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_14" + } + ] + }, + { + "id": "numbers_time_scene_15", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Öffnungstage nennen", + "ru-RU": "Дни работы" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_15" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_05" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_09" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_10" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_15" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_04" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_08" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_04" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_15" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_15" + } + ] + }, + { + "id": "numbers_time_scene_16", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Eine Terminzeit nennen", + "ru-RU": "Называем время встречи" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_16" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_12" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_16" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_11" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_07" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_16" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_16" + } + ] + }, + { + "id": "numbers_time_scene_17", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Was vor und nach einem Termin passiert", + "ru-RU": "До и после встречи" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_20" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_17" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_19" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_09" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_17" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_17" + } + ] + }, + { + "id": "numbers_time_scene_18", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Erster Schultag und Datum", + "ru-RU": "Первый учебный день и дата" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_09" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_15" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_18" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_12" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_08" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_18" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_18" + } + ] + }, + { + "id": "numbers_time_scene_19", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Öffnungszeiten vergleichen", + "ru-RU": "Сравниваем время работы" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_05" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_07" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_19" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_04" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_04" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_10" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_19" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_19" + } + ] + }, + { + "id": "numbers_time_scene_20", + "module_id": "a1_numbers_time_v1", + "titles": { + "de-DE": "Uhrzeiten im Tagesablauf", + "ru-RU": "Время в распорядке дня" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_numbers_time_listening_20" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_numbers_time_vocabulary_11" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_numbers_time_reading_20" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_numbers_time_speaking_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_numbers_time_grammar_02" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_numbers_time_writing_09" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_numbers_time_writing_20" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_numbers_time_speaking_20" + } + ] + }, + { + "id": "daily_life_scene_11", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Der Weg zur Arbeit", + "ru-RU": "Дорога на работу" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_06" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_09" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_11" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_02" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_02" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_08" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_11" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_11" + } + ] + }, + { + "id": "daily_life_scene_12", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Gewohnheiten beim Mittagessen", + "ru-RU": "Привычки за обедом" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_12" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_02" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_13" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_12" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_12" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_12" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_12" + } + ] + }, + { + "id": "daily_life_scene_13", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Abend und Freizeit gemeinsam", + "ru-RU": "Вечер и совместный досуг" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_03" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_20" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_13" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_04" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_13" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_13" + } + ] + }, + { + "id": "daily_life_scene_14", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Abendroutine und Schlafengehen", + "ru-RU": "Вечерние привычки и отход ко сну" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_07" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_20" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_14" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_19" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_04" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_14" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_14" + } + ] + }, + { + "id": "daily_life_scene_15", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Ein Hobby beschreiben", + "ru-RU": "Описываем увлечение" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_15" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_19" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_15" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_07" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_07" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_10" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_15" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_15" + } + ] + }, + { + "id": "daily_life_scene_16", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Ein gemeinsamer Samstag", + "ru-RU": "Совместная суббота" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_16" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_12" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_16" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_09" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_16" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_16" + } + ] + }, + { + "id": "daily_life_scene_17", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Vorlieben und Verneinung", + "ru-RU": "Предпочтения и отрицание" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_01" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_16" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_17" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_09" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_17" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_17" + } + ] + }, + { + "id": "daily_life_scene_18", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Freizeit am Wochenende", + "ru-RU": "Досуг в выходные" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_15" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_18" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_03" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_09" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_10" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_18" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_18" + } + ] + }, + { + "id": "daily_life_scene_19", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Nach der Schule unterwegs", + "ru-RU": "После школы" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_05" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_09" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_19" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_02" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_02" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_07" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_19" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_19" + } + ] + }, + { + "id": "daily_life_scene_20", + "module_id": "a1_daily_life_v1", + "titles": { + "de-DE": "Tägliches Lernen", + "ru-RU": "Ежедневная учёба" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_daily_life_listening_20" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_05" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_daily_life_vocabulary_10" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_daily_life_reading_20" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_05" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_daily_life_speaking_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_11" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_daily_life_grammar_15" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_daily_life_writing_08" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_daily_life_writing_20" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_daily_life_speaking_20" + } + ] + }, + { + "id": "food_shopping_scene_11", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Im Café bestellen", + "ru-RU": "Заказываем в кафе" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_08" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_15" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_11" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_04" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_11" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_11" + } + ] + }, + { + "id": "food_shopping_scene_12", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Preis und günstig vergleichen", + "ru-RU": "Цена и недорогие покупки" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_12" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_12" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_13" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_12" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_02" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_18" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_02" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_12" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_12" + } + ] + }, + { + "id": "food_shopping_scene_13", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Mengen beim Einkauf", + "ru-RU": "Количество продуктов при покупке" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_16" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_13" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_03" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_11" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_13" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_13" + } + ] + }, + { + "id": "food_shopping_scene_14", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Eine Rechnung bezahlen", + "ru-RU": "Оплачиваем счёт" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_10" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_18" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_14" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_02" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_06" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_02" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_14" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_14" + } + ] + }, + { + "id": "food_shopping_scene_15", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Angebot und fehlende Lebensmittel", + "ru-RU": "Что есть и чего нет в меню" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_15" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_07" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_06" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_15" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_03" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_09" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_10" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_15" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_15" + } + ] + }, + { + "id": "food_shopping_scene_16", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Eine Bestellung mit Wunsch", + "ru-RU": "Заказ с пожеланием" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_16" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_09" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_16" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_13" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_07" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_16" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_16" + } + ] + }, + { + "id": "food_shopping_scene_17", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Größe und Preis beim Einkauf", + "ru-RU": "Размер и цена при покупке" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_13" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_17" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_16" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_17" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_17" + } + ] + }, + { + "id": "food_shopping_scene_18", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Ein Getränk kaufen", + "ru-RU": "Покупаем напиток" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_03" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_20" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_18" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_07" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_12" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_07" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_08" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_18" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_18" + } + ] + }, + { + "id": "food_shopping_scene_19", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Geschäft und Besuchszeit", + "ru-RU": "Магазин и время посещения" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_09" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_11" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_19" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_18" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_09" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_19" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_19" + } + ] + }, + { + "id": "food_shopping_scene_20", + "module_id": "a1_food_shopping_v1", + "titles": { + "de-DE": "Eine Einkaufsliste planen", + "ru-RU": "Планируем список покупок" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_food_shopping_listening_20" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_02" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_food_shopping_vocabulary_06" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_food_shopping_reading_20" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_03" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_food_shopping_speaking_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_food_shopping_grammar_20" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_food_shopping_writing_10" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_food_shopping_writing_20" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_food_shopping_speaking_20" + } + ] + }, + { + "id": "home_city_scene_11", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Orte gegenüber beschreiben", + "ru-RU": "Описываем места напротив" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_09" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_17" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_11" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_14" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_03" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_11" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_11" + } + ] + }, + { + "id": "home_city_scene_12", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Einen Weg beschreiben", + "ru-RU": "Объясняем дорогу" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_12" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_10" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_14" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_12" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_10" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_04" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_12" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_12" + } + ] + }, + { + "id": "home_city_scene_13", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Die Zimmer einer Wohnung", + "ru-RU": "Комнаты в квартире" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_06" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_02" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_13" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_18" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_13" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_13" + } + ] + }, + { + "id": "home_city_scene_14", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Möbel und ihre Position", + "ru-RU": "Мебель и её расположение" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_14" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_07" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_08" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_14" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_06" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_06" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_14" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_14" + } + ] + }, + { + "id": "home_city_scene_15", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Orte zwischen anderen Orten", + "ru-RU": "Места между другими местами" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_15" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_11" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_18" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_15" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_03" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_06" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_15" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_03" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_15" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_15" + } + ] + }, + { + "id": "home_city_scene_16", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Haus und Umgebung", + "ru-RU": "Дом и окрестности" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_16" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_05" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_15" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_16" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_05" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_10" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_19" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_05" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_10" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_16" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_16" + } + ] + }, + { + "id": "home_city_scene_17", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Links und rechts auf dem Weg", + "ru-RU": "Налево и направо по дороге" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_17" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_13" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_14" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_17" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_04" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_09" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_10" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_04" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_17" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_17" + } + ] + }, + { + "id": "home_city_scene_18", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Dinge in verschiedenen Räumen", + "ru-RU": "Предметы в разных комнатах" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_18" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_01" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_03" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_18" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_01" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_08" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_03" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_01" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_08" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_18" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_18" + } + ] + }, + { + "id": "home_city_scene_19", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Wohnen über einem Geschäft", + "ru-RU": "Жильё над магазином" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_19" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_06" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_20" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_19" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_05" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_19" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_05" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_19" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_19" + } + ] + }, + { + "id": "home_city_scene_20", + "module_id": "a1_home_city_v1", + "titles": { + "de-DE": "Was es in einer Stadt gibt", + "ru-RU": "Что есть и чего нет в городе" + }, + "steps": [ + { + "phase": "listen", + "bank_entry_id": "a1bank_en_v1_home_city_listening_20" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_15" + }, + { + "phase": "vocabulary", + "bank_entry_id": "a1bank_en_v1_home_city_vocabulary_20" + }, + { + "phase": "read", + "bank_entry_id": "a1bank_en_v1_home_city_reading_20" + }, + { + "phase": "repeat", + "bank_entry_id": "a1bank_en_v1_home_city_speaking_07" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_01" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_02" + }, + { + "phase": "grammar", + "bank_entry_id": "a1bank_en_v1_home_city_grammar_11" + }, + { + "phase": "write", + "bank_entry_id": "a1bank_en_v1_home_city_writing_07" + }, + { + "phase": "compose", + "bank_entry_id": "a1bank_en_v2_home_city_writing_20" + }, + { + "phase": "speak", + "bank_entry_id": "a1bank_en_v2_home_city_speaking_20" + } + ] + } + ] +} diff --git a/apps/web/src/api/adaptive.ts b/apps/web/src/api/adaptive.ts index e854f8d..af8f157 100644 --- a/apps/web/src/api/adaptive.ts +++ b/apps/web/src/api/adaptive.ts @@ -25,7 +25,9 @@ export type CourseAnalysis = { summary: string; facts_version: number; recommended_module_id: string; modules: { module_id: string; strengths: string[]; weaknesses: string[]; recommendation: string; reason: string; ready_for_completion: boolean }[]; }; +export type SequenceRecommendation = { review: boolean; revision: string; sequence_id?: string; title?: string; phase?: string; step: number; steps: number; topic: number; topics: number; task_id?: string; complete: boolean; skipped_steps: number; needs_answer: boolean }; export type CourseCatalog = { + sequence_recommendations?: Record; native_language?: string; native_languages?: string[]; exam_available?: boolean; task_mode?: string; grading_available?: boolean; bank?: {module_id:string;skill:CourseSkill;total:number;unseen:number}[]; profile: LearnerProfile; modules: AdaptiveModule[]; @@ -33,13 +35,13 @@ export type CourseCatalog = { analysis_job?: CourseJob; analysis: CourseAnalysis | null; facts_version: number; enabled_languages: string[]; languages: LanguageProfile[]; exams: { id: string; target_language: string; status: string }[]; }; -export type CourseJob = { instruction_language?: string; id: string; kind: string; status: string; stage: string; task_id?: string; subject_id?: string; error?: string; source?: string; review?: boolean }; +export type CourseJob = { recommendation?: SequenceRecommendation; instruction_language?: string; id: string; kind: string; status: string; stage: string; task_id?: string; subject_id?: string; error?: string; source?: string; review?: boolean }; export type AdaptiveExam = { id: string; status: string; target_language: string; tasks: AdaptiveTask[]; attempts: AdaptiveAttempt[]; scores?: Record; score?: number; summary?: string; summary_status?: string; summary_job_id?: string; preparation_job_id?: string }; export function courseRequestID() { return Array.from(crypto.getRandomValues(new Uint8Array(16)), (b) => b.toString(16).padStart(2, '0')).join(''); } export const getCourseCatalog = () => request('/course/catalog'); export const getCourseHistory = (module: string, offset = 0) => request<{ tasks: AdaptiveTask[]; has_more: boolean }>(`/course/modules/${encodeURIComponent(module)}/tasks?offset=${offset}`); export const getAdaptiveTask = (id: string) => request<{ task: AdaptiveTask; attempt: AdaptiveAttempt | null }>(`/course/tasks/${encodeURIComponent(id)}`); -export const createCourseTask = (module: string, skill: string, requestId: string) => request(`/course/modules/${encodeURIComponent(module)}/tasks/next`, { method: 'POST', body: JSON.stringify({ skill, request_id: requestId }) }); +export const createCourseTask = (module: string, skill: string, requestId: string, skipTaskID?: string) => request(`/course/modules/${encodeURIComponent(module)}/tasks/next`, { method: 'POST', body: JSON.stringify({ skill, request_id: requestId, skip_task_id: skipTaskID }) }); export const getCourseJob = (id: string) => request(`/course/jobs/${encodeURIComponent(id)}`); export const retryCourseJob = (id: string) => request(`/course/jobs/${encodeURIComponent(id)}/retry`, { method: 'POST' }); export const getCourseAttempt = (id: string) => request(`/course/attempts/${encodeURIComponent(id)}`); diff --git a/apps/web/src/i18n/de-DE.json b/apps/web/src/i18n/de-DE.json index 8904f1a..cf3cea4 100644 --- a/apps/web/src/i18n/de-DE.json +++ b/apps/web/src/i18n/de-DE.json @@ -98,7 +98,7 @@ "ui.course_not_yet_available": " – Kurs noch nicht verfügbar", "ui.a_reviewed_a1_course_pack_is_not_yet_available_for": "Für diese Zielsprache ist noch kein geprüftes A1-Sprachpaket freigeschaltet. Dein bisheriger Lernstand bleibt gespeichert.", "ui.your_learning_progress": "Dein Lernstand", - "ui.exercises_are_selected_using_your_saved_evaluations_new_exercises_come": "Die Auswahl nutzt deine gespeicherten Bewertungen. Noch neue Aufgaben haben Vorrang; bei Lernbedarf folgen passende Übungen und Wiederholungen. Unbenotete Antworten zählen nicht als bewerteter Lernnachweis.", + "ui.exercises_are_selected_using_your_saved_evaluations_new_exercises_come": "Der empfohlene Lernweg verbindet Hören, Wortschatz, Lesen, Nachsprechen, Grammatik und Schreiben bis zum freien Sprechen. Einzelne Lernbereiche bleiben direkt wählbar.", "ui.no_ai_learning_analysis_yet_the_teacher_agent_creates_it": "Noch keine KI-Lernanalyse vorhanden. Der Lehrer-Agent erstellt sie aus deinen gespeicherten Antworten.", "ui.the_learning_analysis_is_being_updated_after_your_latest_answer": "Die Lernanalyse wird nach deiner letzten Antwort aktualisiert.", "ui.request_learning_analysis_again": "Lernanalyse erneut anfordern", @@ -443,5 +443,20 @@ "seed.cafe.title": "Im Café", "seed.numbers.title": "Zahlen", "seed.generated.title": "Ausspracheübung", - "seed.historical": "Historischer fester Kurs: Die gespeicherten Aufgaben und Erklärungen bleiben in ihrer ursprünglichen Sprache. Für neue Aufgaben in deiner Muttersprache nutze den aktuellen A1-Kurs." + "seed.historical": "Historischer fester Kurs: Die gespeicherten Aufgaben und Erklärungen bleiben in ihrer ursprünglichen Sprache. Für neue Aufgaben in deiner Muttersprache nutze den aktuellen A1-Kurs.", + "sequence.default": "Empfohlener Lernweg", + "sequence.title": "Dein thematischer Lernweg", + "sequence.intro": "Die Übungen bauen zum selben Thema aufeinander auf. Antworte und wähle dann „Nächste Aufgabe“. Du kannst einen Schritt überspringen oder einen Lernbereich direkt wählen. Bearbeitet bedeutet noch nicht beherrscht.", + "sequence.position": "Thema {topic} von {topics} · Schritt {step} von {steps}", + "sequence.skip": "Diesen Schritt überspringen", + "sequence.complete": "Du hast diesen Lernweg durchgearbeitet oder Schritte übersprungen. Weitere Aufgaben richten sich nach deinen gespeicherten Bewertungen. Das ist noch kein Nachweis, dass du alles beherrschst.", + "sequence.phase.listen": "Zuerst hören", + "sequence.phase.vocabulary": "Wörter im Zusammenhang verstehen", + "sequence.phase.read": "Ein passendes Beispiel lesen", + "sequence.phase.repeat": "Mit Vorlage nachsprechen", + "sequence.phase.grammar": "Das Satzmuster üben", + "sequence.phase.write": "Mit Vorgabe schreiben", + "sequence.phase.compose": "Selbstständig formulieren", + "sequence.phase.speak": "Das Thema frei sprechen", + "sequence.review": "Bei der letzten Antwort gab es einen Fehler. Übe diesen Schritt noch einmal oder überspringe ihn. Danach geht der Lernweg weiter, unabhängig von der Punktzahl." } diff --git a/apps/web/src/i18n/ru-RU.json b/apps/web/src/i18n/ru-RU.json index 31206ca..8cec748 100644 --- a/apps/web/src/i18n/ru-RU.json +++ b/apps/web/src/i18n/ru-RU.json @@ -98,7 +98,7 @@ "ui.course_not_yet_available": " — Курс пока недоступен", "ui.a_reviewed_a1_course_pack_is_not_yet_available_for": "Для этого изучаемого языка пока нет проверенного курса A1. Ваш прежний прогресс сохранён.", "ui.your_learning_progress": "Ваш прогресс в обучении", - "ui.exercises_are_selected_using_your_saved_evaluations_new_exercises_come": "Задания подбираются по сохранённым оценкам. Сначала предлагаются новые задания, затем подходящие упражнения и повторения. Ответы без оценки не считаются оценёнными результатами обучения.", + "ui.exercises_are_selected_using_your_saved_evaluations_new_exercises_come": "Рекомендуемый учебный путь связывает аудирование, лексику, чтение, повторение вслух, грамматику и письмо, подготавливая к самостоятельной речи. Любое направление можно выбрать напрямую.", "ui.no_ai_learning_analysis_yet_the_teacher_agent_creates_it": "Анализа ИИ пока нет. Учитель создаёт его на основе ваших сохранённых ответов.", "ui.the_learning_analysis_is_being_updated_after_your_latest_answer": "Анализ прогресса обновляется после последнего ответа.", "ui.request_learning_analysis_again": "Запросить анализ прогресса повторно", @@ -443,5 +443,20 @@ "seed.cafe.title": "В кафе", "seed.numbers.title": "Числа", "seed.generated.title": "Упражнение на произношение", - "seed.historical": "Исторический фиксированный курс: сохранённые задания и объяснения остаются на исходном языке. Новые задания на вашем родном языке доступны в текущем курсе A1." + "seed.historical": "Исторический фиксированный курс: сохранённые задания и объяснения остаются на исходном языке. Новые задания на вашем родном языке доступны в текущем курсе A1.", + "sequence.default": "Рекомендуемый учебный путь", + "sequence.title": "Ваш тематический учебный путь", + "sequence.intro": "Упражнения последовательно раскрывают одну тему. Ответьте и нажмите «Следующее задание». Можно пропустить шаг или выбрать направление обучения напрямую. Выполненное задание ещё не означает освоение материала.", + "sequence.position": "Тема {topic} из {topics} · Шаг {step} из {steps}", + "sequence.skip": "Пропустить этот шаг", + "sequence.complete": "Вы прошли этот учебный путь или пропустили отдельные шаги. Дальнейшие задания подбираются по сохранённым оценкам. Это ещё не подтверждает освоение всего материала.", + "sequence.phase.listen": "Сначала послушать", + "sequence.phase.vocabulary": "Понять слова в контексте", + "sequence.phase.read": "Прочитать пример по теме", + "sequence.phase.repeat": "Повторить вслух по образцу", + "sequence.phase.grammar": "Потренировать структуру предложения", + "sequence.phase.write": "Написать по заданию", + "sequence.phase.compose": "Самостоятельно составить текст", + "sequence.phase.speak": "Самостоятельно рассказать по теме", + "sequence.review": "В последнем ответе была ошибка. Повторите этот шаг ещё раз или пропустите его. После этого учебный путь продолжится независимо от балла." } diff --git a/apps/web/src/pages/CoursePage.tsx b/apps/web/src/pages/CoursePage.tsx index 1be8f33..c1dbd86 100644 --- a/apps/web/src/pages/CoursePage.tsx +++ b/apps/web/src/pages/CoursePage.tsx @@ -1,6 +1,6 @@ import { errorMessage, useLocalizedMessage } from '../i18n/useLocalizedMessage'; import { useCourseSkillNames } from '../i18n/labels'; -import { useI18n } from '../i18n/I18n'; +import { useI18n, type MessageKey } from '../i18n/I18n'; import { useEffect, useRef, useState } from 'react'; import { request } from '../api/client'; import { @@ -33,6 +33,7 @@ export function CoursePage() { const [restored, setRestored] = useState(false); const [revision, setRevision] = useState(0); const generationID = useRef(null); + const generationSkipID = useRef(undefined); const examRequestID = useRef(null); const exerciseRef = useRef(null); const active = useRef(true); @@ -137,9 +138,12 @@ export function CoursePage() { const timer = window.setTimeout(() => { void refreshCatalog().catch(showError); }, 3000); return () => window.clearTimeout(timer); }, [catalog]); - async function generate() { + async function generate(skip = false) { if (locked || !moduleID) return; setBusy(true); setError(''); - try { generationID.current ??= courseRequestID(); const next = await createCourseTask(moduleID, skill, generationID.current); generationID.current = null; setExam(null); setJob(next); } + try { const skipID = skip ? task?.id : undefined; + if (generationSkipID.current !== skipID) generationID.current = null; + generationSkipID.current = skipID; + generationID.current ??= courseRequestID(); const next = await createCourseTask(moduleID, skill, generationID.current, skipID); generationID.current = null; setExam(null); setJob(next); } catch (err) { showError(err); } finally { setBusy(false); } } async function changeLanguage(language: string) { @@ -166,6 +170,8 @@ export function CoursePage() { if (legacy) return <>; if (!catalog) return

{error || t('ui.loading_a1_course')}

{error && }
; const selected = catalog.modules.find((m) => m.id === moduleID); + const recommendation = catalog.sequence_recommendations?.[moduleID]; + const phases: Record = { listen: 'sequence.phase.listen', vocabulary: 'sequence.phase.vocabulary', read: 'sequence.phase.read', repeat: 'sequence.phase.repeat', grammar: 'sequence.phase.grammar', write: 'sequence.phase.write', compose: 'sequence.phase.compose', speak: 'sequence.phase.speak' }; const analysis = catalog.analysis?.modules.find((m) => m.module_id === moduleID); const progress = catalog.progress.filter((p) => p.module_id === moduleID); const inventory=(catalog.bank??[]).filter(p=>p.module_id===moduleID && (!skill||p.skill===skill)); @@ -187,7 +193,17 @@ export function CoursePage() { )} {selected &&

{t('ui.module')} {selected.order}

{selected.title}

{selected.description}

{analysis &&

{analysis.recommendation}

{analysis.reason}

{analysis.weaknesses?.map((weakness, i) =>

{t('ui.more_practice')} {weakness}

)}
} -
{courseSkills.map((area) => )}
+
{courseSkills.map((area) => )}
+ {skill === '' && recommendation && !exam &&
+

{t('sequence.title')}

+ {recommendation.complete ?

{t('sequence.complete')}

: <> + {recommendation.title} +

{t('sequence.position', { topic: recommendation.topic, topics: recommendation.topics, step: recommendation.step, steps: recommendation.steps })} · {recommendation.phase && phases[recommendation.phase] ? t(phases[recommendation.phase]) : ''}

+

{t('sequence.intro')}

+ {recommendation.review &&

{t('sequence.review')}

} + {recommendation.task_id === task?.id && recommendation.needs_answer && } + } +
}
{selected.key === 'review_test' && }
{noVariant &&

{t('course.noVariant')}

} {selected.key === 'review_test' && catalog.exam_available === false &&

{t('course.examUnavailable')}

} diff --git a/apps/web/tests/README.md b/apps/web/tests/README.md index f6e02b8..cb854d8 100644 --- a/apps/web/tests/README.md +++ b/apps/web/tests/README.md @@ -49,6 +49,16 @@ Sprachrollen, private Hörtexte/Lösungen, unbenotete Antworten sowie eingefrore Aufgaben nach Sprachwechsel und Reload. Ein russischer Test mit zwölf Aufgaben bleibt nach einem Wechsel über dieselbe Request-ID unverändert abrufbar. +`course-sequences.e2e.cjs` prüft auf Deutsch und Russisch den empfohlenen +Lernweg mit Höreinstieg, Wiederaufnahme nach Reload, unveränderten Schritt bei +bloßem Weiterklicken, explizites Überspringen, freie Bereichswahl, Fortsetzung +nach einer Antwort und Erhalt beim Wechsel der Muttersprache. Die Kursbank-Fixture +startet ihn sequenziell nach dem Varianten-Smoke. Keine Modellaufrufe. +Die Go-Datenbanktests prüfen zusätzlich den Weg bis zur gemeldeten Aufgabe über +zwei Freunde: passendes Schreiben vor freiem Sprechen, unbenotete Antworten ohne +falschen Leistungsnachweis, einmaliges Wiederholungsangebot, Request-Replay, +abgewiesene fremde/veraltete Skip-IDs und unveränderte historische Aufgaben. + `course-bank.e2e.cjs` läuft vollständig mit deutscher und russischer Muttersprache: Aufgabenzuweisung, Bedienung aller fünf Darstellungen, Antwort/Reload, Eingabeerhalt beim Sprachwechsel und vollständig abgegebener Test ohne vorzeitige Note oder diff --git a/apps/web/tests/course-sequences.e2e.cjs b/apps/web/tests/course-sequences.e2e.cjs new file mode 100644 index 0000000..7c51d4b --- /dev/null +++ b/apps/web/tests/course-sequences.e2e.cjs @@ -0,0 +1,48 @@ +// Real local API and disposable database; no paid models or actual microphone. +const {chromium}=require(process.env.PLAYWRIGHT_MODULE||'playwright'); +const assert=require('node:assert/strict'),crypto=require('node:crypto'),fs=require('node:fs'); +(async()=>{ + const api=process.env.AI_E2E_API,url=process.env.AI_E2E_URL; + const browser=await chromium.launch({headless:true,args:['--no-sandbox']}); + try { + const page=await browser.newPage();page.setDefaultTimeout(15000);const errors=[];page.on('pageerror',e=>errors.push(e.message)); + for(const native of ['de-DE','ru-RU']) { + const labels=JSON.parse(fs.readFileSync(`src/i18n/${native}.json`)); + const response=await page.request.post(api+'/auth/register',{data:{email:`sequence-${native}-${Date.now()}@example.test`,password:'local-sequence-test-password',native_language:native,target_language:'en-US'}});assert.equal(response.status(),201); + const account=await response.json(),headers={Authorization:`Bearer ${account.token}`}; + const get=async path=>{const r=await page.request.get(api+path,{headers});assert.equal(r.status(),200,await r.text());return r.json()}; + await page.goto(url);await page.evaluate(t=>localStorage.setItem('speech_token',t),account.token);await page.reload();await page.getByRole('button',{name:labels['nav.course'],exact:true}).click(); + const path=page.getByRole('region',{name:labels['sequence.title'],exact:true});await path.waitFor();await path.getByText(labels['sequence.phase.listen'],{exact:false}).waitFor(); + await page.getByRole('button',{name:labels['sequence.default'],exact:true}).waitFor(); + async function next(skip=false) { + const ready=page.waitForResponse(r=>r.url().endsWith('/tasks/next')&&r.request().method()==='POST'); + await page.getByRole('button',{name:labels[skip?'sequence.skip':'ui.next_exercise'],exact:true}).click(); + let job=await(await ready).json();for(let n=0;n<100&&['queued','running'].includes(job.status);n++){await page.waitForTimeout(100);job=await get('/course/jobs/'+job.id)} + assert.equal(job.status,'succeeded',job.error); + await path.getByText(labels['sequence.phase.'+job.recommendation.phase],{exact:false}).waitFor(); + const current=await get('/course/tasks/'+job.task_id); + const exercise=page.getByRole('region',{name:labels['ui.current_course_exercise']});await exercise.getByRole('heading',{name:current.task.instruction||current.task.prompt,exact:true}).waitFor(); + return {job,...current}; + } + const first=await next();assert.equal(first.task.skill,'listening');assert.equal(first.job.recommendation.step,1);assert.equal(first.task.audio_text,undefined);assert.equal(first.task.answer_key,undefined); + const same=await next();assert.equal(same.task.id,first.task.id,'Clicking Next alone must not count as practice'); + await page.reload();await page.getByRole('button',{name:labels['nav.course'],exact:true}).click();await path.getByRole('button',{name:labels['sequence.skip'],exact:true}).waitFor(); + const skipped=await next(true);assert.equal(skipped.job.recommendation.step,2);assert.equal(skipped.job.recommendation.skipped_steps,1);assert.equal(skipped.task.skill,'vocabulary'); + const areas=page.getByRole('group',{name:labels['ui.learning_area']});await areas.getByRole('button',{name:labels['ui.speaking'],exact:true}).click();assert.equal(await path.count(),0); + await areas.getByRole('button',{name:labels['sequence.default'],exact:true}).click();await path.getByText(labels['sequence.phase.vocabulary'],{exact:false}).waitFor(); + // Submit a correct choice through the API, then let the browser continue the path. + const baseline=JSON.parse(fs.readFileSync('../api/internal/store/coursebank/en-US/a1-v2/introductions.vocabulary.json')); + const key=baseline.find(e=>e.id===skipped.task.canonical_task_id).task.answer_key.correct_option_id; + const attempt=await page.request.post(api+'/course/tasks/'+skipped.task.id+'/attempts',{headers,data:{request_id:crypto.randomUUID().replaceAll('-',''),answer:key}});assert.equal(attempt.status(),201); + const continued=await next();assert.equal(continued.job.recommendation.step,3); + const me=await get('/me');assert.deepEqual(me.profile,account.profile); + const other=native==='de-DE'?'ru-RU':'de-DE';await page.locator('.language-picker select').selectOption(other); + const translated=JSON.parse(fs.readFileSync(`src/i18n/${other}.json`));await page.getByRole('region',{name:translated['sequence.title']}).getByText(translated['sequence.phase.vocabulary'],{exact:false}).waitFor(); + const catalog=await get('/course/catalog');assert.equal(catalog.sequence_recommendations.a1_introductions_v1.step,3);assert.equal(catalog.sequence_recommendations.a1_introductions_v1.skipped_steps,1); + assert.equal((await get('/course/tasks/'+continued.task.id)).task.instruction_language,native); + await page.getByRole('button',{name:translated['auth.logout'],exact:true}).click(); + } + const usage=await page.request.get(api+'/admin/ai/usage',{headers:{Authorization:`Bearer ${process.env.AI_E2E_TOKEN}`}});assert.equal((await usage.json()).total,0);assert.deepEqual(errors,[]); + console.log('PASS: German/Russian default thematic paths; listening entry; no silent skip; explicit skip and reload; manual areas remain available; submitted answers advance; native change retains path and frozen task; no model calls.'); + }finally{await browser.close()} +})().catch(e=>{console.error(e);process.exitCode=1}); diff --git a/docs/AI_OPERATIONS.md b/docs/AI_OPERATIONS.md index f708211..ab532d4 100644 --- a/docs/AI_OPERATIONS.md +++ b/docs/AI_OPERATIONS.md @@ -95,7 +95,18 @@ Beim API-Start werden Manifest, Prüfsummen, Verteilung, Lösungen und Rendererf `course_v2_bank` enthält die versionierten Vorlagen, Lernziele und Schwierigkeiten. Die Auswahl erstellt persönliche Kopien in `course_v2_tasks` mit Herkunft `curated`, `bank_entry_id`, Präsentationszeit und Präsentationszähler. Gleichzeitige Auswahlaufträge werden pro Nutzer/Sprachprofil serialisiert. Eine Wiederaufnahme nach Abbruch liefert dieselbe bereits zugewiesene Aufgabe. Der vorhandene Aufgabenverlauf funktioniert weiter. -Neue Aufgaben haben Vorrang. Innerhalb dieser Gruppe werden passende noch neue Lernziele aus schwachen Bewertungen bevorzugt, ohne dafür über die Zielschwierigkeit hinauszugehen. Die letzten fünf echten bewerteten Antworten steuern die Schwierigkeit: nach mindestens drei verschiedenen Aufgaben ab Ø 85 eine Stufe erhöhen, nach mindestens zwei verschiedenen Aufgaben unter Ø 60 eine Stufe senken, jeweils innerhalb 1–3. Sonst bleibt die zuletzt bearbeitete Stufe. Bei erschöpftem Bestand folgen zuletzt schwach gelöste und länger nicht gezeigte Aufgaben; unmittelbare Wiederholungen werden vermieden, sofern Alternativen existieren. Unbenotete oder Demo-Antworten sind kein Fehlernachweis. +Der Standard ohne ausdrückliche Bereichswahl verwendet in den sechs Lernmodulen +60 geprüfte thematische Sequenzen. Die getrennte Fortschrittstabelle speichert +nur Bearbeitungsposition, aktuelle Aufgabe, Wiederholungsangebot und übersprungene +Schritte. Eine Antwort ohne Note bleibt ohne Leistungsnachweis. Unbeantwortete +Schritte bleiben empfohlen, sind aber explizit überspringbar; eine tatsächliche +bewertete Antwort unter 80 Punkten löst höchstens eine Wiederholung pro Schritt +aus. Nach einer weiteren Antwort wird unabhängig von der Note fortgesetzt. Keine +zusätzlichen Modellaufrufe, Budgets oder Profile; der A1-Test bleibt unabhängig. +Quellen und Verhalten: [README](../README.md#a1-kurs). + +Bei ausdrücklich gewähltem Lernbereich, ausgeschöpftem Lernweg und im +Wiederholungsmodul gilt weiterhin: Neue Aufgaben haben Vorrang. Innerhalb dieser Gruppe werden passende noch neue Lernziele aus schwachen Bewertungen bevorzugt, ohne dafür über die Zielschwierigkeit hinauszugehen. Die letzten fünf echten bewerteten Antworten steuern die Schwierigkeit: nach mindestens drei verschiedenen Aufgaben ab Ø 85 eine Stufe erhöhen, nach mindestens zwei verschiedenen Aufgaben unter Ø 60 eine Stufe senken, jeweils innerhalb 1–3. Sonst bleibt die zuletzt bearbeitete Stufe. Bei erschöpftem Bestand folgen zuletzt schwach gelöste und länger nicht gezeigte Aufgaben; unmittelbare Wiederholungen werden vermieden, sofern Alternativen existieren. Unbenotete oder Demo-Antworten sind kein Fehlernachweis. ### Offene Antworten und A1-Test diff --git a/docs/data-model.md b/docs/data-model.md index 1ce7c91..e8aa438 100644 --- a/docs/data-model.md +++ b/docs/data-model.md @@ -58,3 +58,31 @@ and request replays keep it. Both native languages provide 840 task presentation seven modules and the internal A1 exam. All Russian entries are translations with shared base canonical IDs. Retired English pilot variants remain in existing databases for frozen history but are no longer offered. + +## Thematic learning paths + +`course_v2_sequence_progress` is additive state scoped by user, target language, +course version, module and editorial sequence revision. It stores a cursor, +current assignment, presentation timestamp, skipped count and bounded review flag. +It is navigation/participation state, never mastery evidence or an exam result. +Only a new non-demo saved answer for the current presentation or an explicit skip +advances the cursor. A known graded error may offer one repeat; grades never gate +progress. Native changes share the cursor, while task snapshots remain frozen. +Selections and cursor changes commit together under the existing per-user/course +advisory lock. Job results retain recommendation metadata across finalization and +idempotent replay. Direct skill selection and exams do not move this cursor. + +`GET /course/catalog` adds `sequence_recommendations` by module. Recommendations +include localized topic title, current phase and step, topic count, active task, +review/answer-needed flags and explicit skipped count. Completed paths indicate +only that steps were worked through or skipped. `POST /course/modules/{id}/tasks/next` +with empty `skill` uses the path; optional `skip_task_id` explicitly skips the +current owned assignment. Stale/foreign skips fail without changing progress. +The field is rejected alongside an explicit skill or in AI mode. Request replay +must preserve the original skip subject. Existing clients may omit the new field. + +Immutable thematic links are embedded separately from the task/variant banks. +Their source and compiler are pinned by a separate editorial review and manifest; +changing the path requires a new revision. The 840 base entries and Russian +presentations are unchanged. Initial activation begins at the first topic without +reinterpreting historical grades or rewriting existing assignments. diff --git a/tools/course_bank/audit.py b/tools/course_bank/audit.py index 187f50d..33bba12 100644 --- a/tools/course_bank/audit.py +++ b/tools/course_bank/audit.py @@ -49,3 +49,6 @@ print('PASS: 144 reviewed grammar keys, 144 contextual vocabulary items, 144 fac from variants import audit as audit_variants audit_variants() + +from sequences import audit as audit_sequences +audit_sequences() diff --git a/tools/course_bank/build.py b/tools/course_bank/build.py index fe224ed..46d3a08 100644 --- a/tools/course_bank/build.py +++ b/tools/course_bank/build.py @@ -79,3 +79,6 @@ if __name__=='__main__': build() from variants import build as build_variants build_variants() + + from sequences import build as build_sequences + build_sequences() diff --git a/tools/course_bank/review.json b/tools/course_bank/review.json index d232fc8..32c7f4d 100644 --- a/tools/course_bank/review.json +++ b/tools/course_bank/review.json @@ -18,8 +18,8 @@ "Open speaking content/language criteria are separated from Azure pronunciation scores." ], "sources": { - "audit.py": "ec8ad1842390b03ef366726e81baa3f6d24d03165e83aff757de876918e036cf", - "build.py": "e9c047217c6b850e98d88c1ea86995e74fd398915089f51f9552a52c7eb3e077", + "audit.py": "fd41c4c6fcd06b5ce764435393c262e1d0f6c510a598a60b5c0c5bef393b38a3", + "build.py": "9d44b6ecfb3412d520e8e33197b82a09ce9d7b0e6af8ccf463f386082e3f291a", "daily_life.grammar.txt": "0b84ee5b65e2fdf63add826c372c1438215a48c9731c266601ba9160e0e25192", "daily_life.stories.txt": "62bd24776fd4bbbdf7bf5e926f1452f7720e8b061394dced91ff7cc46aed2e03", "daily_life.vocabulary.txt": "4db8b0cf43b1f154e315cefe82970e32e410e61edb047d517ad7310e5aff23aa", diff --git a/tools/course_bank/sequence_review.json b/tools/course_bank/sequence_review.json new file mode 100644 index 0000000..a069967 --- /dev/null +++ b/tools/course_bank/sequence_review.json @@ -0,0 +1,30 @@ +{ + "revision": "thematic-A1-v1", + "reviewed": true, + "sequence_count": 60, + "reviewer": "Codex editorial pass", + "method": "Explicit topical linking of existing listening/reading scenes to related word meanings, spoken models, grammar patterns, short translation and matching open writing/speech. Related models deliberately use different names/details. Participation is not mastery. No independent teacher certification.", + "sources": { + "sequence_sources.json": "f09b3b845fcaee948b0dca211f2c644e649597151563e4c7b8d89bb1aad1ad2a", + "sequences.py": "a20f985ccf180b66b537692eb38fc81061c63e8e32aa9c2ff7ace61b6e43f72a", + "daily_life.grammar.txt": "0b84ee5b65e2fdf63add826c372c1438215a48c9731c266601ba9160e0e25192", + "daily_life.stories.txt": "62bd24776fd4bbbdf7bf5e926f1452f7720e8b061394dced91ff7cc46aed2e03", + "daily_life.vocabulary.txt": "4db8b0cf43b1f154e315cefe82970e32e410e61edb047d517ad7310e5aff23aa", + "family.grammar.txt": "2f30205b3f17a45f6f2272a4cf616cb6a7abc73f2af808be16a3b14983121c3e", + "family.stories.txt": "caf8363c09831106c592a6323d65f28c46b4a71dab5263bd8e71346c4c1fc89e", + "family.vocabulary.txt": "226ca654d0cb00ce64da9e9f2b5885f3a0b086833dddf6e95a8149cdf071cee3", + "food_shopping.grammar.txt": "da585dbb71ee6855010272433a1c4d589b49b8137bfa2f4504292f34a4f12481", + "food_shopping.stories.txt": "7bab84c03180d8760c618804e530a93ec042c57b4ffd504f4269edeb94f7ffd9", + "food_shopping.vocabulary.txt": "cdb19da92e611f439d435c79a2f7c70544a8deeedb4774726d80edd01a1bccd6", + "home_city.grammar.txt": "7622f06c27441cb7a8e9874c40ab3b8b4ce8bd225e461be6cadc1867849d1f1d", + "home_city.stories.txt": "df55a7d643ae76eb6edc3956da15ff91daa66620a07f7af3072ad3ec675bc462", + "home_city.vocabulary.txt": "28701a513c4119f110a6dbcd8cc32b704db018a674e58fc41f9975cf5b5a5fd5", + "introductions.grammar.txt": "63908be080f56268d3cf0ea03f827177d332d4a23f1e01c5a3fbb513e8b2eccf", + "introductions.stories.txt": "d187cc61ad8873c5a8c53d956f7b723689218364cce5e196c59ebbadda48405c", + "introductions.vocabulary.txt": "c120cdb9ccf7d70c1f61c8fcbee0bcffc8e474ceae420edcb9c59eee8b2356f1", + "numbers_time.grammar.txt": "33b50bd88db2b78af7de93bd81be1442912ce4519bccd10d5da2b78f6f4c33b9", + "numbers_time.stories.txt": "1127477a8f80c613f94c838c0c80d5c9176e1a6eef7bcc8a72b4e95d5cb1245f", + "numbers_time.vocabulary.txt": "fa2d4b1284f3d89789d3b25310739f62356361d090489f995d8734a306fbeef0", + "open_instructions.json": "dc6e2239a146080c8eb2f6d54f3877c5e01afaa9d4b196104184bb6623f24728" + } +} diff --git a/tools/course_bank/sequence_sources.json b/tools/course_bank/sequence_sources.json new file mode 100644 index 0000000..b1d5aa4 --- /dev/null +++ b/tools/course_bank/sequence_sources.json @@ -0,0 +1,1237 @@ +{ + "revision": "thematic-A1-v1", + "modules": { + "introductions": [ + [ + 13, + [ + 2, + 11, + 12 + ], + [ + 1, + 4 + ], + [ + 1, + 5, + 6 + ], + [ + 1, + 4 + ], + "Name und Nachname", + "Имя и фамилия" + ], + [ + 11, + [ + 3, + 9 + ], + [ + 2 + ], + [ + 7, + 11, + 12 + ], + [ + 2 + ], + "Herkunft nennen", + "Откуда я" + ], + [ + 20, + [ + 3, + 10, + 16 + ], + [ + 5 + ], + [ + 1, + 7 + ], + [ + 5 + ], + "Herkunft und Wohnort", + "Происхождение и место жительства" + ], + [ + 12, + [ + 10, + 16 + ], + [ + 2, + 5 + ], + [ + 3, + 13 + ], + [ + 2, + 5 + ], + "Eine Person vorstellen", + "Представляем человека" + ], + [ + 15, + [ + 6, + 16 + ], + [ + 3, + 7 + ], + [ + 4, + 14 + ], + [ + 3, + 7 + ], + "Eine Freundin vorstellen", + "Представляем подругу" + ], + [ + 14, + [ + 6, + 17, + 18 + ], + [ + 3, + 8 + ], + [ + 9, + 10 + ], + [ + 8 + ], + "Zwei Freunde und ihre Sprache", + "Два друга и их язык" + ], + [ + 16, + [ + 9, + 17, + 18 + ], + [ + 6, + 8 + ], + [ + 9, + 10 + ], + [ + 6, + 8 + ], + "Herkunft und Sprachen einer Gruppe", + "Откуда мы и на каких языках говорим" + ], + [ + 17, + [ + 10, + 16 + ], + [ + 5, + 9 + ], + [ + 1, + 6 + ], + [ + 5, + 9 + ], + "Name und Wohnort verbinden", + "Имя и место жительства" + ], + [ + 18, + [ + 1, + 13, + 15 + ], + [ + 1, + 10 + ], + [ + 1, + 5 + ], + [ + 1, + 10 + ], + "Sich in einer Gruppe vorstellen", + "Знакомство в группе" + ], + [ + 19, + [ + 2, + 11, + 12 + ], + [ + 1, + 9 + ], + [ + 5, + 6 + ], + [ + 1, + 9 + ], + "Name und Rufname", + "Имя и как меня называют" + ] + ], + "family": [ + [ + 11, + [ + 6, + 7, + 8 + ], + [ + 5 + ], + [ + 9, + 14 + ], + [ + 5 + ], + "Ein Kind vorstellen", + "Представляем ребёнка" + ], + [ + 12, + [ + 4, + 18, + 20 + ], + [ + 1, + 3 + ], + [ + 1, + 15 + ], + [ + 1, + 3 + ], + "Aussehen eines Familienmitglieds", + "Внешность члена семьи" + ], + [ + 13, + [ + 3 + ], + [ + 2 + ], + [ + 2, + 8 + ], + [ + 2 + ], + "Geschwister und Hobbys", + "Братья, сёстры и увлечения" + ], + [ + 14, + [ + 10 + ], + [ + 6 + ], + [ + 3, + 17 + ], + [ + 6 + ], + "Großeltern und ihr Zuhause", + "Бабушка, дедушка и их дом" + ], + [ + 15, + [ + 7, + 19 + ], + [ + 2 + ], + [ + 3, + 16 + ], + [ + 2 + ], + "Name und Alter eines Kindes", + "Имя и возраст ребёнка" + ], + [ + 16, + [ + 8 + ], + [ + 5 + ], + [ + 2, + 14 + ], + [ + 5 + ], + "Ein Kind und seine Schule", + "Ребёнок и его школа" + ], + [ + 17, + [ + 16 + ], + [ + 3 + ], + [ + 4, + 14 + ], + [ + 3 + ], + "Eine Partnerin vorstellen", + "Представляем супругу" + ], + [ + 18, + [ + 17 + ], + [ + 4 + ], + [ + 3, + 5 + ], + [ + 4 + ], + "Einen Partner vorstellen", + "Представляем супруга" + ], + [ + 19, + [ + 3, + 14 + ], + [ + 2, + 5 + ], + [ + 7, + 13 + ], + [ + 2, + 5 + ], + "Geschwister im Plural", + "Братья и сёстры во множественном числе" + ], + [ + 20, + [ + 14, + 15 + ], + [ + 5, + 7 + ], + [ + 6, + 19 + ], + [ + 5, + 7 + ], + "Familie und Haustier", + "Семья и домашний питомец" + ] + ], + "numbers_time": [ + [ + 11, + [ + 16, + 14 + ], + [ + 3, + 5 + ], + [ + 4, + 12, + 18 + ], + [ + 3, + 5 + ], + "Datum und Beginn einer Feier", + "Дата и начало праздника" + ], + [ + 12, + [ + 11, + 17 + ], + [ + 2 + ], + [ + 2, + 10 + ], + [ + 2 + ], + "Aufstehen und Losgehen", + "Подъём и выход из дома" + ], + [ + 13, + [ + 2, + 4 + ], + [ + 6 + ], + [ + 6, + 17 + ], + [ + 6 + ], + "Personen zählen", + "Считаем людей" + ], + [ + 14, + [ + 14, + 8 + ], + [ + 3 + ], + [ + 4, + 18 + ], + [ + 3 + ], + "Monat und Dauer eines Urlaubs", + "Месяц и длительность отпуска" + ], + [ + 15, + [ + 5, + 9, + 10 + ], + [ + 4, + 5 + ], + [ + 3, + 8 + ], + [ + 4, + 5 + ], + "Öffnungstage nennen", + "Дни работы" + ], + [ + 16, + [ + 18, + 12 + ], + [ + 7 + ], + [ + 7, + 11 + ], + [ + 7 + ], + "Eine Terminzeit nennen", + "Называем время встречи" + ], + [ + 17, + [ + 19, + 20 + ], + [ + 1, + 9 + ], + [ + 1, + 19 + ], + [ + 1, + 9 + ], + "Was vor und nach einem Termin passiert", + "До и после встречи" + ], + [ + 18, + [ + 9, + 15 + ], + [ + 1, + 8 + ], + [ + 12, + 14 + ], + [ + 1, + 8 + ], + "Erster Schultag und Datum", + "Первый учебный день и дата" + ], + [ + 19, + [ + 5, + 7 + ], + [ + 4, + 10 + ], + [ + 1, + 3 + ], + [ + 4, + 10 + ], + "Öffnungszeiten vergleichen", + "Сравниваем время работы" + ], + [ + 20, + [ + 11 + ], + [ + 1, + 9 + ], + [ + 1, + 2 + ], + [ + 1, + 9 + ], + "Uhrzeiten im Tagesablauf", + "Время в распорядке дня" + ] + ], + "daily_life": [ + [ + 11, + [ + 6, + 9 + ], + [ + 2, + 8 + ], + [ + 2, + 3 + ], + [ + 2, + 8 + ], + "Der Weg zur Arbeit", + "Дорога на работу" + ], + [ + 12, + [ + 2, + 13 + ], + [ + 1, + 6 + ], + [ + 1, + 12 + ], + [ + 1, + 6 + ], + "Gewohnheiten beim Mittagessen", + "Привычки за обедом" + ], + [ + 13, + [ + 3, + 20 + ], + [ + 4 + ], + [ + 4, + 5 + ], + [ + 4 + ], + "Abend und Freizeit gemeinsam", + "Вечер и совместный досуг" + ], + [ + 14, + [ + 7, + 20 + ], + [ + 4 + ], + [ + 3, + 19 + ], + [ + 4 + ], + "Abendroutine und Schlafengehen", + "Вечерние привычки и отход ко сну" + ], + [ + 15, + [ + 19 + ], + [ + 7, + 10 + ], + [ + 2, + 14 + ], + [ + 7, + 10 + ], + "Ein Hobby beschreiben", + "Описываем увлечение" + ], + [ + 16, + [ + 11, + 12 + ], + [ + 9 + ], + [ + 4, + 14 + ], + [ + 9 + ], + "Ein gemeinsamer Samstag", + "Совместная суббота" + ], + [ + 17, + [ + 1, + 16 + ], + [ + 1, + 6 + ], + [ + 6, + 9 + ], + [ + 1, + 6 + ], + "Vorlieben und Verneinung", + "Предпочтения и отрицание" + ], + [ + 18, + [ + 19, + 15 + ], + [ + 3, + 10 + ], + [ + 2, + 9 + ], + [ + 3, + 10 + ], + "Freizeit am Wochenende", + "Досуг в выходные" + ], + [ + 19, + [ + 5, + 9 + ], + [ + 2, + 7 + ], + [ + 4, + 5 + ], + [ + 2, + 7 + ], + "Nach der Schule unterwegs", + "После школы" + ], + [ + 20, + [ + 5, + 10 + ], + [ + 5, + 8 + ], + [ + 11, + 15 + ], + [ + 5, + 8 + ], + "Tägliches Lernen", + "Ежедневная учёба" + ] + ], + "food_shopping": [ + [ + 11, + [ + 8, + 15 + ], + [ + 1, + 4 + ], + [ + 7, + 3 + ], + [ + 1, + 4 + ], + "Im Café bestellen", + "Заказываем в кафе" + ], + [ + 12, + [ + 11, + 12, + 13 + ], + [ + 2, + 6 + ], + [ + 5, + 18 + ], + [ + 2, + 6 + ], + "Preis und günstig vergleichen", + "Цена и недорогие покупки" + ], + [ + 13, + [ + 16 + ], + [ + 3, + 5 + ], + [ + 3, + 10, + 11 + ], + [ + 3, + 5 + ], + "Mengen beim Einkauf", + "Количество продуктов при покупке" + ], + [ + 14, + [ + 10, + 17, + 18 + ], + [ + 2, + 6 + ], + [ + 5, + 6 + ], + [ + 2, + 6 + ], + "Eine Rechnung bezahlen", + "Оплачиваем счёт" + ], + [ + 15, + [ + 7, + 6 + ], + [ + 3, + 10 + ], + [ + 8, + 9 + ], + [ + 3, + 10 + ], + "Angebot und fehlende Lebensmittel", + "Что есть и чего нет в меню" + ], + [ + 16, + [ + 9 + ], + [ + 1, + 7 + ], + [ + 2, + 7, + 13 + ], + [ + 1, + 7 + ], + "Eine Bestellung mit Wunsch", + "Заказ с пожеланием" + ], + [ + 17, + [ + 11, + 13 + ], + [ + 6 + ], + [ + 6, + 16 + ], + [ + 6 + ], + "Größe und Preis beim Einkauf", + "Размер и цена при покупке" + ], + [ + 18, + [ + 3, + 20 + ], + [ + 7, + 8 + ], + [ + 4, + 12 + ], + [ + 7, + 8 + ], + "Ein Getränk kaufen", + "Покупаем напиток" + ], + [ + 19, + [ + 9, + 11 + ], + [ + 9 + ], + [ + 5, + 18 + ], + [ + 9 + ], + "Geschäft und Besuchszeit", + "Магазин и время посещения" + ], + [ + 20, + [ + 2, + 6 + ], + [ + 3, + 10 + ], + [ + 9, + 20 + ], + [ + 3, + 10 + ], + "Eine Einkaufsliste planen", + "Планируем список покупок" + ] + ], + "home_city": [ + [ + 11, + [ + 9, + 17 + ], + [ + 3 + ], + [ + 6, + 14 + ], + [ + 3 + ], + "Orte gegenüber beschreiben", + "Описываем места напротив" + ], + [ + 12, + [ + 10, + 14 + ], + [ + 4 + ], + [ + 8, + 9, + 10 + ], + [ + 4 + ], + "Einen Weg beschreiben", + "Объясняем дорогу" + ], + [ + 13, + [ + 6, + 2 + ], + [ + 5 + ], + [ + 2, + 18 + ], + [ + 5 + ], + "Die Zimmer einer Wohnung", + "Комнаты в квартире" + ], + [ + 14, + [ + 7, + 8 + ], + [ + 1, + 6 + ], + [ + 4, + 5, + 6 + ], + [ + 1, + 6 + ], + "Möbel und ihre Position", + "Мебель и её расположение" + ], + [ + 15, + [ + 11, + 18 + ], + [ + 3 + ], + [ + 6, + 15 + ], + [ + 3 + ], + "Orte zwischen anderen Orten", + "Места между другими местами" + ], + [ + 16, + [ + 5, + 15 + ], + [ + 5, + 10 + ], + [ + 1, + 19 + ], + [ + 5, + 10 + ], + "Haus und Umgebung", + "Дом и окрестности" + ], + [ + 17, + [ + 13, + 14 + ], + [ + 4 + ], + [ + 8, + 9, + 10 + ], + [ + 4 + ], + "Links und rechts auf dem Weg", + "Налево и направо по дороге" + ], + [ + 18, + [ + 1, + 3 + ], + [ + 1, + 8 + ], + [ + 1, + 3 + ], + [ + 1, + 8 + ], + "Dinge in verschiedenen Räumen", + "Предметы в разных комнатах" + ], + [ + 19, + [ + 6, + 20 + ], + [ + 5 + ], + [ + 1, + 19 + ], + [ + 5 + ], + "Wohnen über einem Geschäft", + "Жильё над магазином" + ], + [ + 20, + [ + 15, + 20 + ], + [ + 7 + ], + [ + 1, + 2, + 11 + ], + [ + 7 + ], + "Was es in einer Stadt gibt", + "Что есть и чего нет в городе" + ] + ] + } +} diff --git a/tools/course_bank/sequences.py b/tools/course_bank/sequences.py new file mode 100644 index 0000000..8a57c0a --- /dev/null +++ b/tools/course_bank/sequences.py @@ -0,0 +1,56 @@ +"""Reviewed thematic links between immutable tasks; never changes task content.""" +import hashlib +import json +import pathlib +BASE = pathlib.Path(__file__).resolve().parent +DEST = BASE.parents[1] / 'apps/api/internal/store/coursebank' + + +def compile_sequences(): + review_bytes = (BASE / 'sequence_review.json').read_bytes() + review = json.loads(review_bytes) + assert review['reviewed'] + for name, digest in review['sources'].items(): + assert hashlib.sha256((BASE / name).read_bytes()).hexdigest() == digest, f'Sequence review is stale: {name}' + source = json.loads((BASE / 'sequence_sources.json').read_text()) + entries = {} + for path in (DEST / 'en-US/a1-v2').glob('*.json'): + if path.name != 'manifest.json': + entries[path.name] = json.loads(path.read_text()) + sequences = [] + for module, rows in source['modules'].items(): + for scene, vocab, repeats, grammar, writing, de, ru in rows: + steps = [] + for phase, skill, numbers in [('listen', 'listening', [scene]), ('vocabulary', 'vocabulary', vocab), ('read', 'reading', [scene]), ('repeat', 'speaking', repeats), ('grammar', 'grammar', grammar), ('write', 'writing', writing), ('compose', 'writing', [scene]), ('speak', 'speaking', [scene])]: + for number in numbers: + entry = entries[f'{module}.{skill}.json'][number - 1] + expected = {'listen':'choice','vocabulary':'choice','read':'choice','repeat':'repeat_sentence','grammar':'choice','write':'short_text','compose':'free_text','speak':'free_speech'}[phase] + assert entry['task']['kind'] == expected + steps.append(dict(phase=phase, bank_entry_id=entry['id'])) + sequences.append(dict(id=f'{module}_scene_{scene:02d}', module_id=f'a1_{module}_v1', titles={'de-DE':de,'ru-RU':ru}, steps=steps)) + assert len(sequences) == review['sequence_count'] == 60 + return dict(revision=source['revision'], editorial_review_sha256=hashlib.sha256(review_bytes).hexdigest(), sequences=sequences) + + +def build(): + data = (json.dumps(compile_sequences(),ensure_ascii=False,indent=2)+'\n').encode() + (DEST/'sequences.json').write_bytes(data) + (DEST/'sequence_manifest.json').write_text(json.dumps({'sha256':hashlib.sha256(data).hexdigest()},indent=2)+'\n') + print('Wrote 60 thematic learning sequences in six modules; no task content changed.') + + +def audit(): + data = (DEST/'sequences.json').read_bytes() + assert hashlib.sha256(data).hexdigest() == json.loads((DEST/'sequence_manifest.json').read_text())['sha256'] + assert json.loads(data) == compile_sequences() + for seq in json.loads(data)['sequences']: + assert seq['steps'][0]['phase']=='listen' and seq['steps'][-1]['phase']=='speak' + assert all(seq['titles'][lang] for lang in ('de-DE','ru-RU')) + assert seq['steps'][-2]['phase']=='compose' + assert seq['steps'][-2]['bank_entry_id'].replace('_writing_','_speaking_') == seq['steps'][-1]['bank_entry_id'] + print('PASS: 60 reviewed thematic sequences, listening first and free speaking after related recognition, repeat, grammar and writing; immutable task links.') + + +if __name__ == '__main__': + build() + audit()