Identische Grundlagenwiederholungen im Lernweg gezielt reduzieren
Der thematische Lernweg berücksichtigt bisher gut gelöste Aufgaben nun bei neuen Schritten. Kürzlich positive Grundlagen führen bevorzugt zu unbekannten, redaktionell freigegebenen Grammatikbeispielen desselben Satzmusters. Ohne neues Beispiel können aktuelle oder unabhängig gestützte positive Ergebnisse weitere identische Grundlagenwiederholungen reduzieren. Ältere, neuere schwache und unbenotete Ergebnisse werden vorsichtig behandelt; Wortbedeutungen bleiben getrennt. Berücksichtigte frühere Übung wird separat vom manuellen Überspringen gezählt, ohne neue Antworten, Noten oder Beherrschungsnachweise zu erzeugen. Gewählte Transferbeispiele bleiben stabil. Lernwegposition, historische Aufgaben und Bewertungen sowie Prüfungen bleiben erhalten; unvollständige Prüfungen und Demoantworten liefern keine positiven Auswahlbelege. Frühere Bewertungen werden bei einer erneut empfohlenen Aufgabe ausdrücklich eingeklappt gekennzeichnet. Validierung: Go-Race-Suite mit eigener lokaler PostgreSQL-Testdatenbank, go vet, Web-Build, Bank-/Varianten-/Sequenzaudit sowie lokale Browser-Smokes für Sprachen, Kurs und vorherige Bewertungen. Geprüft sind unter anderem Nutzertrennung, Zeitabstände, neue Fehler, unbenotete Antworten und stabile Transferbeispiele beim Sprachwechsel. Keine zusätzlichen Modellaufrufe oder Produktionsänderungen.
This commit is contained in:
@@ -94,6 +94,12 @@ die aktuellen Daten, bevor du Aussagen aus älteren Dokumenten übernimmst.
|
|||||||
- Lernwegposition und übersprungene Schritte sind keine Leistungsnachweise.
|
- Lernwegposition und übersprungene Schritte sind keine Leistungsnachweise.
|
||||||
Bereiche bleiben direkt wählbar; keine Mindestnote als Zugangssperre einführen.
|
Bereiche bleiben direkt wählbar; keine Mindestnote als Zugangssperre einführen.
|
||||||
Lernwege und ihre Wiederholungen verändern weder historische Aufgaben noch Tests.
|
Lernwege und ihre Wiederholungen verändern weder historische Aufgaben noch Tests.
|
||||||
|
- Gute aktuelle Grundlagen dürfen seltener wiederholt werden. Neue Grammatikbeispiele
|
||||||
|
brauchen ausdrücklich geprüfte Verknüpfungen zum selben Satzmuster; gleiche grobe
|
||||||
|
Lernzielbezeichnungen allein reichen nicht. Wortbedeutungen nicht austauschen.
|
||||||
|
- Berücksichtigte frühere Übung ist getrennt von manuellem Überspringen zu zählen.
|
||||||
|
Keine Antworten, Noten oder Beherrschungsnachweise dafür erzeugen. Neuere Fehler,
|
||||||
|
unbenotete Antworten und die Privatsphäre laufender Tests berücksichtigen.
|
||||||
- Unterstützte Darstellungen: `choice`, `short_text`, `free_text`,
|
- Unterstützte Darstellungen: `choice`, `short_text`, `free_text`,
|
||||||
`repeat_sentence` und `free_speech`.
|
`repeat_sentence` und `free_speech`.
|
||||||
- Hör- und Lesematerial sowie Lösungsschlüssel nur entsprechend der
|
- Hör- und Lesematerial sowie Lösungsschlüssel nur entsprechend der
|
||||||
|
|||||||
@@ -138,6 +138,33 @@ explizites Überspringen setzt den Weg ohne Mindestnote fort. Gespeicherte
|
|||||||
unbenotete Antworten zählen als Bearbeitung, niemals als Beherrschung.
|
unbenotete Antworten zählen als Bearbeitung, niemals als Beherrschung.
|
||||||
Demoantworten und bloßes Klicken auf „Nächste Aufgabe“ zählen nicht als Bearbeitung.
|
Demoantworten und bloßes Klicken auf „Nächste Aufgabe“ zählen nicht als Bearbeitung.
|
||||||
|
|
||||||
|
Bereits gut bearbeitete Grundlagen werden seltener erneut angeboten. Nur für
|
||||||
|
Grammatik gibt es ausdrücklich redaktionell freigegebene neue Beispiele zum
|
||||||
|
selben Satzmuster; ein grob gemeinsames Lernziel allein reicht nicht aus.
|
||||||
|
Wortschatzaufgaben behalten ihre konkrete Wortbedeutung. Hören, Lesen,
|
||||||
|
Nachsprechen und die Schreib-/Sprechaufgaben zum Thema bleiben erhalten.
|
||||||
|
|
||||||
|
Für diese Auswahl zählen nur eigene, echte Bewertungen derselben Lernsprache
|
||||||
|
und Kursversion. Demoantworten, unbenotete Antworten und noch nicht abgeschlossene
|
||||||
|
Tests liefern keine positiven Nachweise. Eine neuere unbenotete Antwort oder ein
|
||||||
|
neuerer Fehler verdrängt die bisherige positive Auswahlannahme. Bereits zugewiesene
|
||||||
|
Aufgaben bleiben während eines Schritts stabil, auch bei Neuladen oder Sprachwechsel.
|
||||||
|
|
||||||
|
Eine gerade gut gelöste identische Grundlage wird innerhalb von 30 Minuten nicht
|
||||||
|
unnötig wiederholt, sofern kein unbekanntes freigegebenes Grammatikbeispiel
|
||||||
|
angeboten werden kann. Danach begründen zwei gute Antworten mit mindestens
|
||||||
|
24 Stunden Abstand oder bei Grammatik gute Ergebnisse in drei verschiedenen
|
||||||
|
freigegebenen Beispielen weniger Wiederholungen. Die jüngste passende Bewertung
|
||||||
|
muss mindestens 85 Punkte haben und höchstens sieben Tage alt sein; betrachtet
|
||||||
|
werden bis zu 2.000 jüngste Antworten der letzten 30 Tage pro Modul. Ältere oder
|
||||||
|
unzureichende Nachweise führen zum Auffrischen. Das sind Auswahlheuristiken,
|
||||||
|
keine Beherrschungsdiagnose. Berücksichtigte frühere Übungsschritte werden getrennt
|
||||||
|
vom manuellen Überspringen gezählt; es entstehen keine neuen Antworten oder Noten.
|
||||||
|
|
||||||
|
Frühere Bewertungen einer erneut empfohlenen Aufgabe erscheinen eingeklappt als
|
||||||
|
**Bewertung deines vorherigen Versuchs**. Eine neue Antwort erhält weiterhin ihren
|
||||||
|
eigenen Versuch und gegebenenfalls eine eigene Bewertung.
|
||||||
|
|
||||||
Die Oberfläche zeigt Thema und Schritt auf Deutsch beziehungsweise Russisch.
|
Die Oberfläche zeigt Thema und Schritt auf Deutsch beziehungsweise Russisch.
|
||||||
Neuladen, ein Modulwechsel und der Wechsel der Muttersprache erhalten den Lernweg.
|
Neuladen, ein Modulwechsel und der Wechsel der Muttersprache erhalten den Lernweg.
|
||||||
Die sechs Lernbereiche bleiben direkt auswählbar und verändern den Lernweg nicht.
|
Die sechs Lernbereiche bleiben direkt auswählbar und verändern den Lernweg nicht.
|
||||||
|
|||||||
@@ -9,10 +9,14 @@ type LearningSequence struct {
|
|||||||
Steps []LearningSequenceStep `json:"steps"`
|
Steps []LearningSequenceStep `json:"steps"`
|
||||||
}
|
}
|
||||||
type LearningSequenceStep struct {
|
type LearningSequenceStep struct {
|
||||||
|
Alternatives []string `json:"alternatives,omitempty"`
|
||||||
Phase string `json:"phase"`
|
Phase string `json:"phase"`
|
||||||
BankEntryID string `json:"bank_entry_id"`
|
BankEntryID string `json:"bank_entry_id"`
|
||||||
}
|
}
|
||||||
type SequenceRecommendation struct {
|
type SequenceRecommendation struct {
|
||||||
|
SelectionRevision string `json:"selection_revision"`
|
||||||
|
PracticeReason string `json:"practice_reason,omitempty"`
|
||||||
|
ReusedSteps int `json:"reused_steps"`
|
||||||
Review bool `json:"review"`
|
Review bool `json:"review"`
|
||||||
NeedsAnswer bool `json:"needs_answer"`
|
NeedsAnswer bool `json:"needs_answer"`
|
||||||
Revision string `json:"revision"`
|
Revision string `json:"revision"`
|
||||||
|
|||||||
@@ -0,0 +1,185 @@
|
|||||||
|
package services
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"speech-learning-api/internal/domain"
|
||||||
|
"speech-learning-api/internal/store"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestLearningPathAdaptsOnlyFromOwnedGradedEvidence(t *testing.T) {
|
||||||
|
for _, scenario := range []string{"fresh-vocabulary", "spaced-vocabulary", "old-vocabulary", "ungraded", "demo", "other-user", "same-day", "grammar-transfer", "newer-mistake"} {
|
||||||
|
t.Run(scenario, func(t *testing.T) {
|
||||||
|
db, profiles := adaptiveTestDB(t)
|
||||||
|
ctx := context.Background()
|
||||||
|
now := time.Now().UTC()
|
||||||
|
user, err := profiles.CreateUser(ctx, store.NewID("adapt")+"@example.test", "hash", "ru-RU")
|
||||||
|
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"
|
||||||
|
entries, err := store.BundledBank()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
bank := map[string]domain.BankEntry{}
|
||||||
|
for _, e := range entries {
|
||||||
|
bank[e.ID] = e
|
||||||
|
}
|
||||||
|
baseID := "a1bank_en_v1_introductions_vocabulary_02"
|
||||||
|
if scenario == "grammar-transfer" || scenario == "newer-mistake" {
|
||||||
|
baseID = "a1bank_en_v1_introductions_grammar_01"
|
||||||
|
}
|
||||||
|
owner := user.ID
|
||||||
|
if scenario == "other-user" {
|
||||||
|
other, err := profiles.CreateUser(ctx, store.NewID("unrelated")+"@example.test", "hash", "de-DE")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
owner = other.ID
|
||||||
|
}
|
||||||
|
entry := bank[baseID]
|
||||||
|
historical := entry.Task
|
||||||
|
historical.ID = store.NewID("history")
|
||||||
|
historical.Source = "curated"
|
||||||
|
historical.CanonicalTaskID = entry.ID
|
||||||
|
historical.InstructionLanguage = "de-DE"
|
||||||
|
raw, _ := json.Marshal(historical)
|
||||||
|
if _, err = db.ExecContext(ctx, `INSERT INTO course_v2_tasks(id,module_id,language,version,owner_id,source,skill,kind,data,fingerprint,bank_entry_id) VALUES($1,$2,'en-US',$3,$4,'curated',$5,$6,$7,$8,$9)`, historical.ID, historical.ModuleID, domain.CourseVersion, owner, historical.Skill, historical.Kind, raw, "bank:"+baseID, baseID); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
insert := func(status string, score float64, age time.Duration, demo bool) {
|
||||||
|
t.Helper()
|
||||||
|
var evaluation any
|
||||||
|
if status == "graded" {
|
||||||
|
verdict := "correct"
|
||||||
|
if score < 100 {
|
||||||
|
verdict = "incorrect"
|
||||||
|
}
|
||||||
|
b, _ := json.Marshal(domain.CourseEvaluation{Score: score, Verdict: verdict, Feedback: "fixture", Issues: []string{}})
|
||||||
|
evaluation = b
|
||||||
|
}
|
||||||
|
if _, err = db.ExecContext(ctx, `INSERT INTO course_v2_attempts(id,user_id,task_id,request_id,answer,status,evaluation,demo,created_at) VALUES($1,$2,$3,$4,'fixture',$5,$6,$7,$8)`, store.NewID("answer"), owner, historical.ID, store.NewID("request"), status, evaluation, demo, now.Add(-age)); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch scenario {
|
||||||
|
case "spaced-vocabulary":
|
||||||
|
insert("graded", 100, 48*time.Hour, false)
|
||||||
|
insert("graded", 100, time.Hour, false)
|
||||||
|
case "old-vocabulary":
|
||||||
|
insert("graded", 100, 8*24*time.Hour, false)
|
||||||
|
case "ungraded":
|
||||||
|
insert("graded", 100, time.Hour, false)
|
||||||
|
insert("ungraded", 0, time.Minute, false)
|
||||||
|
case "demo":
|
||||||
|
insert("graded", 100, time.Minute, true)
|
||||||
|
case "same-day":
|
||||||
|
insert("graded", 100, 3*time.Hour, false)
|
||||||
|
insert("graded", 100, 2*time.Hour, false)
|
||||||
|
insert("graded", 100, time.Hour, false)
|
||||||
|
case "newer-mistake":
|
||||||
|
insert("graded", 100, time.Hour, false)
|
||||||
|
insert("graded", 0, time.Minute, false)
|
||||||
|
default:
|
||||||
|
insert("graded", 100, 10*time.Minute, false)
|
||||||
|
}
|
||||||
|
run := func(skip string) (domain.AdaptiveTask, domain.CourseJob) {
|
||||||
|
t.Helper()
|
||||||
|
job, err := engine.Repo.Enqueue(ctx, user.ID, "en-US", "next", "a1_introductions_v1", "", skip, store.NewID("next"))
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
return *task, saved
|
||||||
|
}
|
||||||
|
task, job := run("")
|
||||||
|
if task.Skill != "listening" {
|
||||||
|
t.Fatal("context was skipped")
|
||||||
|
}
|
||||||
|
task, job = run(task.ID)
|
||||||
|
if scenario == "fresh-vocabulary" || scenario == "spaced-vocabulary" {
|
||||||
|
if task.CanonicalTaskID == baseID || job.Recommendation.ReusedSteps != 1 || job.Recommendation.SkippedSteps != 1 {
|
||||||
|
t.Fatal("good prior evidence not reused separately from skipping", job)
|
||||||
|
}
|
||||||
|
} else if scenario != "grammar-transfer" && scenario != "newer-mistake" {
|
||||||
|
if task.CanonicalTaskID != baseID || job.Recommendation.ReusedSteps != 0 {
|
||||||
|
t.Fatal("unreliable evidence reduced practice", job)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if scenario == "grammar-transfer" || scenario == "newer-mistake" {
|
||||||
|
for n := 0; n < 20 && job.Recommendation.Phase != "grammar"; n++ {
|
||||||
|
task, job = run(task.ID)
|
||||||
|
}
|
||||||
|
if job.Recommendation.Phase != "grammar" {
|
||||||
|
t.Fatal("grammar not reached")
|
||||||
|
}
|
||||||
|
if scenario == "grammar-transfer" {
|
||||||
|
if task.CanonicalTaskID == baseID || job.Recommendation.PracticeReason != "transfer" || bank[task.CanonicalTaskID].Goal != entry.Goal {
|
||||||
|
t.Fatal("missing approved new example", task, job)
|
||||||
|
}
|
||||||
|
chosen := task.CanonicalTaskID
|
||||||
|
task, job = run("")
|
||||||
|
if task.CanonicalTaskID != chosen {
|
||||||
|
t.Fatal("new request swapped unanswered transfer example")
|
||||||
|
}
|
||||||
|
beforeStep := job.Recommendation.Step
|
||||||
|
if _, err = profiles.UpdatePreferences(ctx, user.ID, "de-DE", "", "", 0); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
task, job = run("")
|
||||||
|
if task.CanonicalTaskID != chosen || task.InstructionLanguage != "de-DE" || job.Recommendation.Step != beforeStep {
|
||||||
|
t.Fatal("native change reset transfer/path")
|
||||||
|
}
|
||||||
|
} else if task.CanonicalTaskID != baseID || job.Recommendation.PracticeReason != "refresh" {
|
||||||
|
t.Fatal("newer mistake ignored")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var frozen []byte
|
||||||
|
if err = db.QueryRowContext(ctx, `SELECT data FROM course_v2_tasks WHERE id=$1`, historical.ID).Scan(&frozen); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
var stored domain.AdaptiveTask
|
||||||
|
if err = json.Unmarshal(frozen, &stored); err != nil || stored.Prompt != historical.Prompt {
|
||||||
|
t.Fatal("historical content changed", err)
|
||||||
|
}
|
||||||
|
var graded int
|
||||||
|
if err = db.QueryRowContext(ctx, `SELECT count(*) FROM course_v2_attempts WHERE user_id=$1 AND status='graded'`, user.ID).Scan(&graded); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
expected := 1
|
||||||
|
if scenario == "spaced-vocabulary" || scenario == "newer-mistake" {
|
||||||
|
expected = 2
|
||||||
|
}
|
||||||
|
if scenario == "same-day" {
|
||||||
|
expected = 3
|
||||||
|
}
|
||||||
|
if scenario == "other-user" {
|
||||||
|
expected = 0
|
||||||
|
}
|
||||||
|
if graded != expected {
|
||||||
|
t.Fatal("navigation fabricated a graded attempt", graded, expected)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
package store
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"database/sql"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"speech-learning-api/internal/domain"
|
||||||
|
)
|
||||||
|
|
||||||
|
const foundationFreshness = 7 * 24 * time.Hour
|
||||||
|
const foundationCooldown = 30 * time.Minute
|
||||||
|
|
||||||
|
type foundationAttempt struct {
|
||||||
|
BankID string
|
||||||
|
Goal string
|
||||||
|
Status string
|
||||||
|
Score float64
|
||||||
|
At time.Time
|
||||||
|
}
|
||||||
|
type foundationHistory struct {
|
||||||
|
Attempts map[string][]foundationAttempt
|
||||||
|
Assigned map[string]bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only real, graded evidence can reduce practice. Pending/ungraded latest
|
||||||
|
// answers remain in the history so older good scores cannot silently overrule them.
|
||||||
|
func readFoundationHistory(ctx context.Context, tx *sql.Tx, j domain.CourseJob, now time.Time) (foundationHistory, error) {
|
||||||
|
history := foundationHistory{Attempts: map[string][]foundationAttempt{}, Assigned: map[string]bool{}}
|
||||||
|
rows, err := tx.QueryContext(ctx, `SELECT b.id,b.goal,a.status,COALESCE((a.evaluation->>'score')::float8,-1),a.created_at FROM course_v2_attempts a JOIN course_v2_tasks t ON t.id=a.task_id JOIN course_v2_bank b ON b.id=COALESCE(NULLIF(t.data->>'canonical_task_id',''),t.bank_entry_id) LEFT JOIN course_v2_exams e ON e.id=a.exam_id WHERE a.user_id=$1 AND t.owner_id=$1 AND t.language=$2 AND t.version=$3 AND b.module_id=$4 AND NOT a.demo AND (a.exam_id IS NULL OR (e.status='completed' AND e.user_id=$1 AND e.language=$2 AND e.version=$3)) AND a.created_at >= $5 AND a.created_at <= $6 ORDER BY a.created_at DESC,a.id DESC LIMIT 2000`, j.UserID, j.Language, domain.CourseVersion, j.ModuleID, now.Add(-30*24*time.Hour), now)
|
||||||
|
if err != nil {
|
||||||
|
return history, err
|
||||||
|
}
|
||||||
|
for rows.Next() {
|
||||||
|
var attempt foundationAttempt
|
||||||
|
if err = rows.Scan(&attempt.BankID, &attempt.Goal, &attempt.Status, &attempt.Score, &attempt.At); err != nil {
|
||||||
|
rows.Close()
|
||||||
|
return history, err
|
||||||
|
}
|
||||||
|
history.Attempts[attempt.BankID] = append(history.Attempts[attempt.BankID], attempt)
|
||||||
|
}
|
||||||
|
err = rows.Err()
|
||||||
|
rows.Close()
|
||||||
|
if err != nil {
|
||||||
|
return history, err
|
||||||
|
}
|
||||||
|
// Even an unfinished exam assignment is not a new transfer example. Its hidden
|
||||||
|
// grades are excluded above and must never influence this recommendation.
|
||||||
|
rows, err = tx.QueryContext(ctx, `SELECT DISTINCT COALESCE(NULLIF(data->>'canonical_task_id',''),bank_entry_id) FROM course_v2_tasks WHERE owner_id=$1 AND language=$2 AND version=$3 AND module_id=$4 AND COALESCE(NULLIF(data->>'canonical_task_id',''),bank_entry_id) IS NOT NULL`, j.UserID, j.Language, domain.CourseVersion, j.ModuleID)
|
||||||
|
if err != nil {
|
||||||
|
return history, err
|
||||||
|
}
|
||||||
|
defer rows.Close()
|
||||||
|
for rows.Next() {
|
||||||
|
var id string
|
||||||
|
if err = rows.Scan(&id); err != nil {
|
||||||
|
return history, err
|
||||||
|
}
|
||||||
|
history.Assigned[id] = true
|
||||||
|
}
|
||||||
|
return history, rows.Err()
|
||||||
|
}
|
||||||
|
func (h foundationHistory) recentGood(id string, now time.Time) bool {
|
||||||
|
attempts := h.Attempts[id]
|
||||||
|
if len(attempts) == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
last := attempts[0]
|
||||||
|
return last.Status == "graded" && last.Score >= 85 && !last.At.After(now) && now.Sub(last.At) <= foundationFreshness
|
||||||
|
}
|
||||||
|
func (h foundationHistory) reusable(step domain.LearningSequenceStep, now time.Time) bool {
|
||||||
|
if !h.recentGood(step.BankEntryID, now) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
attempts := h.Attempts[step.BankEntryID]
|
||||||
|
latest := attempts[0]
|
||||||
|
// Avoid immediate massed repetition of the exact same item. This is a short
|
||||||
|
// cooldown, not a declaration of mastery or another successful attempt.
|
||||||
|
if now.Sub(latest.At) <= foundationCooldown {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// Repeated clicks/locale variants on the same day do not establish density.
|
||||||
|
for _, attempt := range attempts[1:] {
|
||||||
|
if attempt.Status != "graded" || attempt.Score < 85 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if latest.At.Sub(attempt.At) >= 24*time.Hour {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Only editorially approved sentence-pattern alternatives support transfer;
|
||||||
|
// a different word meaning/preposition with the same broad goal does not.
|
||||||
|
if step.Phase == "grammar" {
|
||||||
|
good := 1
|
||||||
|
for _, id := range step.Alternatives {
|
||||||
|
if h.recentGood(id, now) {
|
||||||
|
good++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return good >= 3
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns an actual candidate or reuses earlier evidence for this scaffold step.
|
||||||
|
// Listening, reading and all production stages always keep their thematic task.
|
||||||
|
func chooseFoundation(step domain.LearningSequenceStep, candidates []bankCandidate, history foundationHistory, now time.Time) (index int, reuse bool, reason string) {
|
||||||
|
index = -1
|
||||||
|
byID := map[string]int{}
|
||||||
|
for n, c := range candidates {
|
||||||
|
byID[c.bankEntryID] = n
|
||||||
|
}
|
||||||
|
original, ok := byID[step.BankEntryID]
|
||||||
|
if !ok {
|
||||||
|
return -1, false, ""
|
||||||
|
}
|
||||||
|
if step.Phase != "grammar" && step.Phase != "vocabulary" {
|
||||||
|
return original, false, "foundation"
|
||||||
|
}
|
||||||
|
if !history.recentGood(step.BankEntryID, now) {
|
||||||
|
reason = "foundation"
|
||||||
|
if len(history.Attempts[step.BankEntryID]) > 0 {
|
||||||
|
reason = "refresh"
|
||||||
|
}
|
||||||
|
return original, false, reason
|
||||||
|
}
|
||||||
|
for _, id := range step.Alternatives {
|
||||||
|
if n, available := byID[id]; available && !history.Assigned[id] {
|
||||||
|
return n, false, "transfer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if history.reusable(step, now) {
|
||||||
|
return original, true, "recent_practice"
|
||||||
|
}
|
||||||
|
return original, false, "refresh"
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package store
|
||||||
|
|
||||||
|
import (
|
||||||
|
"speech-learning-api/internal/domain"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestFoundationRepetitionPolicy(t *testing.T) {
|
||||||
|
now := time.Date(2026, 11, 11, 12, 0, 0, 0, time.UTC)
|
||||||
|
step := domain.LearningSequenceStep{Phase: "grammar", BankEntryID: "base", Alternatives: []string{"other", "third"}}
|
||||||
|
candidates := []bankCandidate{{bankEntryID: "base"}, {bankEntryID: "other"}, {bankEntryID: "third"}}
|
||||||
|
attempt := func(id, status string, score float64, age time.Duration) foundationAttempt {
|
||||||
|
return foundationAttempt{BankID: id, Status: status, Score: score, At: now.Add(-age)}
|
||||||
|
}
|
||||||
|
history := func(attempts ...foundationAttempt) foundationHistory {
|
||||||
|
h := foundationHistory{Attempts: map[string][]foundationAttempt{}, Assigned: map[string]bool{}}
|
||||||
|
for _, a := range attempts {
|
||||||
|
h.Attempts[a.BankID] = append(h.Attempts[a.BankID], a)
|
||||||
|
h.Assigned[a.BankID] = true
|
||||||
|
}
|
||||||
|
return h
|
||||||
|
}
|
||||||
|
t.Run("new pattern starts with its own foundation", func(t *testing.T) {
|
||||||
|
h := history(attempt("other", "graded", 100, time.Minute))
|
||||||
|
n, reuse, _ := chooseFoundation(step, candidates, h, now)
|
||||||
|
if n != 0 || reuse {
|
||||||
|
t.Fatal(n, reuse)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("a new approved example checks transfer", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 100, time.Hour))
|
||||||
|
n, reuse, reason := chooseFoundation(step, candidates, h, now)
|
||||||
|
if n != 1 || reuse || reason != "transfer" {
|
||||||
|
t.Fatal(n, reuse, reason)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("assigned exam or locale variant is not new", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 100, time.Hour))
|
||||||
|
h.Assigned["other"] = true
|
||||||
|
n, _, _ := chooseFoundation(step, candidates, h, now)
|
||||||
|
if n != 2 {
|
||||||
|
t.Fatal(n)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("a newer mistake defeats older good scores", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 0, time.Minute), attempt("base", "graded", 100, 48*time.Hour))
|
||||||
|
n, reuse, _ := chooseFoundation(step, candidates, h, now)
|
||||||
|
if n != 0 || reuse {
|
||||||
|
t.Fatal(n, reuse)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("ungraded is not successful evidence", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "ungraded", 100, time.Minute), attempt("base", "graded", 100, time.Hour))
|
||||||
|
n, reuse, _ := chooseFoundation(step, candidates, h, now)
|
||||||
|
if n != 0 || reuse {
|
||||||
|
t.Fatal(n, reuse)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("old practice is refreshed", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 100, 8*24*time.Hour))
|
||||||
|
n, reuse, reason := chooseFoundation(step, candidates, h, now)
|
||||||
|
if n != 0 || reuse || reason != "refresh" {
|
||||||
|
t.Fatal(n, reuse, reason)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("immediate duplicate may be omitted without a mastery claim", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 100, 10*time.Minute))
|
||||||
|
h.Assigned["other"] = true
|
||||||
|
h.Assigned["third"] = true
|
||||||
|
_, reuse, reason := chooseFoundation(step, candidates, h, now)
|
||||||
|
if !reuse || reason != "recent_practice" {
|
||||||
|
t.Fatal(reuse, reason)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("same-day repetitions cannot manufacture evidence density", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 100, time.Hour), attempt("base", "graded", 100, 2*time.Hour), attempt("base", "graded", 100, 3*time.Hour))
|
||||||
|
h.Assigned["other"] = true
|
||||||
|
h.Assigned["third"] = true
|
||||||
|
if h.reusable(step, now) {
|
||||||
|
t.Fatal("repetition count treated as independent evidence")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("spaced positives reduce repetitions", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 100, time.Hour), attempt("base", "graded", 100, 48*time.Hour))
|
||||||
|
if !h.reusable(step, now) {
|
||||||
|
t.Fatal("spaced practice ignored")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("different pattern examples support fewer repetitions", func(t *testing.T) {
|
||||||
|
h := history(attempt("base", "graded", 100, time.Hour), attempt("other", "graded", 100, 2*time.Hour), attempt("third", "graded", 100, 3*time.Hour))
|
||||||
|
if !h.reusable(step, now) {
|
||||||
|
t.Fatal("transfer evidence ignored")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
t.Run("unrelated words never replace a meaning", func(t *testing.T) {
|
||||||
|
word := domain.LearningSequenceStep{Phase: "vocabulary", BankEntryID: "base"}
|
||||||
|
h := history(attempt("other", "graded", 100, time.Hour))
|
||||||
|
n, reuse, _ := chooseFoundation(word, candidates, h, now)
|
||||||
|
if n != 0 || reuse {
|
||||||
|
t.Fatal(n, reuse)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
for _, phase := range []string{"listen", "read", "repeat", "write", "compose", "speak"} {
|
||||||
|
t.Run("thematic context preserved/"+phase, func(t *testing.T) {
|
||||||
|
s := step
|
||||||
|
s.Phase = phase
|
||||||
|
h := history(attempt("base", "graded", 100, time.Minute))
|
||||||
|
n, reuse, _ := chooseFoundation(s, candidates, h, now)
|
||||||
|
if n != 0 || reuse {
|
||||||
|
t.Fatal("production/context was bypassed")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"speech-learning-api/internal/domain"
|
"speech-learning-api/internal/domain"
|
||||||
)
|
)
|
||||||
@@ -29,9 +30,12 @@ CREATE TABLE IF NOT EXISTS course_v2_sequence_progress (
|
|||||||
reviewed BOOLEAN NOT NULL DEFAULT false,
|
reviewed BOOLEAN NOT NULL DEFAULT false,
|
||||||
PRIMARY KEY(user_id,language,version,module_id,revision));
|
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;
|
ALTER TABLE course_v2_sequence_progress ADD COLUMN IF NOT EXISTS reviewed BOOLEAN NOT NULL DEFAULT false;
|
||||||
|
ALTER TABLE course_v2_sequence_progress ADD COLUMN IF NOT EXISTS reused_steps INT NOT NULL DEFAULT 0 CHECK(reused_steps>=0);
|
||||||
|
ALTER TABLE course_v2_sequence_progress ADD COLUMN IF NOT EXISTS practice_reason TEXT NOT NULL DEFAULT '';
|
||||||
`
|
`
|
||||||
|
|
||||||
type sequencePack struct {
|
type sequencePack struct {
|
||||||
|
SelectionRevision string `json:"selection_revision"`
|
||||||
Revision string `json:"revision"`
|
Revision string `json:"revision"`
|
||||||
Review string `json:"editorial_review_sha256"`
|
Review string `json:"editorial_review_sha256"`
|
||||||
Sequences []domain.LearningSequence `json:"sequences"`
|
Sequences []domain.LearningSequence `json:"sequences"`
|
||||||
@@ -67,7 +71,7 @@ func bundledSequences() (sequencePack, error) {
|
|||||||
return sequencesPack, sequencesError
|
return sequencesPack, sequencesError
|
||||||
}
|
}
|
||||||
func validateSequences(pack sequencePack, base []domain.BankEntry) error {
|
func validateSequences(pack sequencePack, base []domain.BankEntry) error {
|
||||||
if pack.Revision == "" || len(pack.Review) != 64 || len(pack.Sequences) == 0 {
|
if pack.Revision == "" || pack.SelectionRevision == "" || len(pack.Review) != 64 || len(pack.Sequences) == 0 {
|
||||||
return errors.New("missing sequence review")
|
return errors.New("missing sequence review")
|
||||||
}
|
}
|
||||||
entries := map[string]domain.BankEntry{}
|
entries := map[string]domain.BankEntry{}
|
||||||
@@ -93,6 +97,14 @@ func validateSequences(pack sequencePack, base []domain.BankEntry) error {
|
|||||||
if next >= len(phases) || step.Phase != phases[next] || !ok || entry.Task.ModuleID != seq.ModuleID || entry.Task.Kind != kinds[next] || entry.Task.Skill != skills[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)
|
return fmt.Errorf("invalid sequence step: %s/%s", seq.ID, step.BankEntryID)
|
||||||
}
|
}
|
||||||
|
alternatives := map[string]bool{step.BankEntryID: true}
|
||||||
|
for _, id := range step.Alternatives {
|
||||||
|
alternate, ok := entries[id]
|
||||||
|
if step.Phase != "grammar" || !ok || alternatives[id] || alternate.Goal != entry.Goal || alternate.Task.ModuleID != seq.ModuleID || alternate.Task.Skill != "grammar" || alternate.Task.Kind != "choice" {
|
||||||
|
return fmt.Errorf("invalid transfer alternative: %s/%s", seq.ID, id)
|
||||||
|
}
|
||||||
|
alternatives[id] = true
|
||||||
|
}
|
||||||
phase = next
|
phase = next
|
||||||
}
|
}
|
||||||
if phase != len(phases)-1 {
|
if phase != len(phases)-1 {
|
||||||
@@ -136,7 +148,7 @@ func sequencePositions(pack sequencePack, module string) []sequencePosition {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
func recommendationAt(pack sequencePack, positions []sequencePosition, cursor, skipped int, task, native string) *domain.SequenceRecommendation {
|
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}
|
r := &domain.SequenceRecommendation{SelectionRevision: pack.SelectionRevision, Revision: pack.Revision, Complete: cursor >= len(positions), SkippedSteps: skipped}
|
||||||
if r.Complete {
|
if r.Complete {
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
@@ -168,13 +180,17 @@ func (s *AdaptiveStore) SequenceRecommendation(ctx context.Context, user, langua
|
|||||||
}
|
}
|
||||||
var cursor, skipped int
|
var cursor, skipped int
|
||||||
var reviewed bool
|
var reviewed bool
|
||||||
|
var reused int
|
||||||
|
var reason string
|
||||||
var task string
|
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)
|
err = s.db.QueryRowContext(ctx, `SELECT cursor,skipped_steps,COALESCE(active_task_id,''),reviewed,reused_steps,practice_reason 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, &reused, &reason)
|
||||||
if err != nil && !errors.Is(err, sql.ErrNoRows) {
|
if err != nil && !errors.Is(err, sql.ErrNoRows) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
r := recommendationAt(pack, positions, cursor, skipped, task, native)
|
r := recommendationAt(pack, positions, cursor, skipped, task, native)
|
||||||
r.Review = reviewed
|
r.Review = reviewed
|
||||||
|
r.ReusedSteps = reused
|
||||||
|
r.PracticeReason = reason
|
||||||
if task != "" && !r.Complete {
|
if task != "" && !r.Complete {
|
||||||
answered, err := sequenceAnswered(ctx, s.db, domain.CourseJob{UserID: user, Language: language, ModuleID: module}, pack.Revision)
|
answered, err := sequenceAnswered(ctx, s.db, domain.CourseJob{UserID: user, Language: language, ModuleID: module}, pack.Revision)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -186,6 +202,8 @@ func (s *AdaptiveStore) SequenceRecommendation(ctx context.Context, user, langua
|
|||||||
}
|
}
|
||||||
|
|
||||||
type sequenceSelection struct {
|
type sequenceSelection struct {
|
||||||
|
Reused int
|
||||||
|
Reason string
|
||||||
Reset bool
|
Reset bool
|
||||||
Reviewed bool
|
Reviewed bool
|
||||||
Cursor int
|
Cursor int
|
||||||
@@ -214,9 +232,11 @@ func selectSequence(ctx context.Context, tx *sql.Tx, j domain.CourseJob, candida
|
|||||||
}
|
}
|
||||||
var cursor, skipped int
|
var cursor, skipped int
|
||||||
var reviewed bool
|
var reviewed bool
|
||||||
|
var reused int
|
||||||
|
var reason string
|
||||||
reset := false
|
reset := false
|
||||||
var active string
|
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)
|
err = tx.QueryRowContext(ctx, `SELECT cursor,skipped_steps,COALESCE(active_task_id,''),reviewed,reused_steps,practice_reason 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, &reused, &reason)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
@@ -252,19 +272,53 @@ func selectSequence(ctx context.Context, tx *sql.Tx, j domain.CourseJob, candida
|
|||||||
active = ""
|
active = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r := recommendationAt(pack, positions, cursor, skipped, active, j.InstructionLanguage)
|
index := 0
|
||||||
r.Review = reviewed
|
if cursor < len(positions) && active != "" {
|
||||||
selection := &sequenceSelection{Cursor: cursor, Skipped: skipped, Recommendation: r, Reviewed: reviewed, Reset: reset}
|
// Keep a chosen transfer example stable across reload, locale changes,
|
||||||
if r.Complete {
|
// retries and fresh Next requests; evidence updates never replace it mid-step.
|
||||||
return selection, 0, nil
|
var bankID string
|
||||||
|
if err = tx.QueryRowContext(ctx, `SELECT bank_entry_id FROM course_v2_tasks WHERE id=$1 AND owner_id=$2 AND language=$3 AND version=$4 AND exam_id IS NULL`, active, j.UserID, j.Language, domain.CourseVersion).Scan(&bankID); err != nil {
|
||||||
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
index = -1
|
||||||
for n, candidate := range candidates {
|
for n, candidate := range candidates {
|
||||||
if candidate.bankEntryID == positions[cursor].Step.BankEntryID {
|
if candidate.bankEntryID == bankID {
|
||||||
return selection, n, nil
|
index = n
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if index < 0 {
|
||||||
return nil, 0, ErrCourseVariantUnavailable
|
return nil, 0, ErrCourseVariantUnavailable
|
||||||
}
|
}
|
||||||
|
} else if cursor < len(positions) {
|
||||||
|
now := time.Now().UTC()
|
||||||
|
history, err := readFoundationHistory(ctx, tx, j, now)
|
||||||
|
if err != nil {
|
||||||
|
return nil, 0, err
|
||||||
|
}
|
||||||
|
for cursor < len(positions) {
|
||||||
|
var reuse bool
|
||||||
|
index, reuse, reason = chooseFoundation(positions[cursor].Step, candidates, history, now)
|
||||||
|
if index < 0 {
|
||||||
|
return nil, 0, ErrCourseVariantUnavailable
|
||||||
|
}
|
||||||
|
if !reuse {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
cursor++
|
||||||
|
reused++
|
||||||
|
reset = true
|
||||||
|
reviewed = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
r := recommendationAt(pack, positions, cursor, skipped, active, j.InstructionLanguage)
|
||||||
|
r.Review = reviewed
|
||||||
|
r.ReusedSteps = reused
|
||||||
|
r.PracticeReason = reason
|
||||||
|
selection := &sequenceSelection{Cursor: cursor, Skipped: skipped, Recommendation: r, Reviewed: reviewed, Reset: reset, Reused: reused, Reason: reason}
|
||||||
|
return selection, index, nil
|
||||||
|
}
|
||||||
|
|
||||||
func saveSequenceSelection(ctx context.Context, tx *sql.Tx, j domain.CourseJob, selection *sequenceSelection, taskID string) error {
|
func saveSequenceSelection(ctx context.Context, tx *sql.Tx, j domain.CourseJob, selection *sequenceSelection, taskID string) error {
|
||||||
if selection == nil {
|
if selection == nil {
|
||||||
return nil
|
return nil
|
||||||
@@ -275,7 +329,7 @@ func saveSequenceSelection(ctx context.Context, tx *sql.Tx, j domain.CourseJob,
|
|||||||
}
|
}
|
||||||
r.TaskID = taskID
|
r.TaskID = taskID
|
||||||
r.NeedsAnswer = 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)
|
_, 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,reused_steps=$11,practice_reason=$12 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, selection.Reused, selection.Reason)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,18 @@ func TestReviewedSequencesProtectPreparation(t *testing.T) {
|
|||||||
t.Fatal("missing Russian topic accepted")
|
t.Fatal("missing Russian topic accepted")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
t.Run("transfer stays in the reviewed grammar pattern", func(t *testing.T) {
|
||||||
|
copy := copyPack()
|
||||||
|
for i := range copy.Sequences[0].Steps {
|
||||||
|
if copy.Sequences[0].Steps[i].Phase == "grammar" {
|
||||||
|
copy.Sequences[0].Steps[i].Alternatives = []string{"a1bank_en_v1_introductions_vocabulary_01"}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if validateSequences(copy, base) == nil {
|
||||||
|
t.Fatal("unrelated transfer accepted")
|
||||||
|
}
|
||||||
|
})
|
||||||
for _, module := range []string{"introductions", "family", "numbers_time", "daily_life", "food_shopping", "home_city"} {
|
for _, module := range []string{"introductions", "family", "numbers_time", "daily_life", "food_shopping", "home_city"} {
|
||||||
positions := sequencePositions(pack, "a1_"+module+"_v1")
|
positions := sequencePositions(pack, "a1_"+module+"_v1")
|
||||||
if len(positions) == 0 || positions[0].Step.Phase != "listen" {
|
if len(positions) == 0 || positions[0].Step.Phase != "listen" {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"sha256": "808b5b14d40eeee0d4cd47f584532e71c6bbb1a9c090d0166fd055861213efa8"
|
"sha256": "dcba655de48bc8839d26b5f4d858f33a208cae7bd4731c30956aad0567214ae5"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"revision": "thematic-A1-v1",
|
"revision": "thematic-A1-v1",
|
||||||
"editorial_review_sha256": "324686f3d9d33eac46063cca2530feae3cf4f8337d9b4f73a700b38bd70f5727",
|
"selection_revision": "adaptive-repetition-v1",
|
||||||
|
"editorial_review_sha256": "edeff4514292866d97f8cd59cc539844de952dd1ee1516be38b47e3eb2c58418",
|
||||||
"sequences": [
|
"sequences": [
|
||||||
{
|
{
|
||||||
"id": "introductions_scene_13",
|
"id": "introductions_scene_13",
|
||||||
@@ -40,15 +41,36 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_06"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_06",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_13",
|
||||||
|
"a1bank_en_v1_introductions_grammar_14",
|
||||||
|
"a1bank_en_v1_introductions_grammar_19"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -102,11 +124,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_11"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_11",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_18"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_12"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_12",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_08"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -156,7 +184,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -210,11 +246,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_13"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_13",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_06",
|
||||||
|
"a1bank_en_v1_introductions_grammar_14",
|
||||||
|
"a1bank_en_v1_introductions_grammar_19"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -268,11 +317,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_14"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_14",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_06",
|
||||||
|
"a1bank_en_v1_introductions_grammar_13",
|
||||||
|
"a1bank_en_v1_introductions_grammar_19"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -330,11 +392,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_09"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_10"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_10",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -388,11 +466,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_09"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_10"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_10",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -446,11 +540,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_06"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_06",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_13",
|
||||||
|
"a1bank_en_v1_introductions_grammar_14",
|
||||||
|
"a1bank_en_v1_introductions_grammar_19"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -508,11 +615,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -570,11 +693,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_01",
|
||||||
|
"a1bank_en_v1_introductions_grammar_02",
|
||||||
|
"a1bank_en_v1_introductions_grammar_03",
|
||||||
|
"a1bank_en_v1_introductions_grammar_04",
|
||||||
|
"a1bank_en_v1_introductions_grammar_09",
|
||||||
|
"a1bank_en_v1_introductions_grammar_10"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_introductions_grammar_06"
|
"bank_entry_id": "a1bank_en_v1_introductions_grammar_06",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_introductions_grammar_13",
|
||||||
|
"a1bank_en_v1_introductions_grammar_14",
|
||||||
|
"a1bank_en_v1_introductions_grammar_19"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -628,11 +764,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_09"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_09",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_02",
|
||||||
|
"a1bank_en_v1_family_grammar_03",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_14"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_14",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_08",
|
||||||
|
"a1bank_en_v1_family_grammar_15"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -686,11 +833,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_02",
|
||||||
|
"a1bank_en_v1_family_grammar_03",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_09",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_15"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_15",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_08",
|
||||||
|
"a1bank_en_v1_family_grammar_14"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -736,11 +894,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_03",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_09",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_08"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_08",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_14",
|
||||||
|
"a1bank_en_v1_family_grammar_15"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -782,7 +951,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_02",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_09",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -832,11 +1008,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_02",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_09",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_16"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_16",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_02",
|
||||||
|
"a1bank_en_v1_family_grammar_03",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_09"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -878,11 +1068,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_03",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_09",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_14"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_14",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_08",
|
||||||
|
"a1bank_en_v1_family_grammar_15"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -924,11 +1125,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_05",
|
||||||
|
"a1bank_en_v1_family_grammar_13"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_14"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_14",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_08",
|
||||||
|
"a1bank_en_v1_family_grammar_15"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -970,11 +1179,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_02",
|
||||||
|
"a1bank_en_v1_family_grammar_06",
|
||||||
|
"a1bank_en_v1_family_grammar_09",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_04",
|
||||||
|
"a1bank_en_v1_family_grammar_13"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -1028,7 +1248,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_13"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_13",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_04",
|
||||||
|
"a1bank_en_v1_family_grammar_05"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -1082,7 +1306,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_family_grammar_06"
|
"bank_entry_id": "a1bank_en_v1_family_grammar_06",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_family_grammar_01",
|
||||||
|
"a1bank_en_v1_family_grammar_02",
|
||||||
|
"a1bank_en_v1_family_grammar_03",
|
||||||
|
"a1bank_en_v1_family_grammar_09",
|
||||||
|
"a1bank_en_v1_family_grammar_16"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1140,11 +1371,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_numbers_time_grammar_13"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_12"
|
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_12",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_numbers_time_grammar_03"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1298,7 +1535,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_numbers_time_grammar_13"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1356,7 +1596,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_numbers_time_grammar_12"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1522,7 +1765,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_12"
|
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_12",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_numbers_time_grammar_03"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1584,7 +1830,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_numbers_time_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_numbers_time_grammar_12"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -1692,11 +1941,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_03",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_11",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_15",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_16",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_02",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_11",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_15",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_16",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -1750,7 +2013,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_04",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_05"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1804,11 +2071,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_01",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_05"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_01",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_04"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -1854,7 +2129,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_03"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_03",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_02",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_11",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_15",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_16",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1904,7 +2186,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_03",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_11",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_15",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_16",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -1958,7 +2247,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_01",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_05"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -2012,11 +2305,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_06"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_06",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_09"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_09"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_09",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_06"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -2070,11 +2369,21 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_03",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_11",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_15",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_16",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_09"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_09",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_06"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -2128,11 +2437,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_01",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_05"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_01",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_04"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -2186,11 +2503,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_11"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_11",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_02",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_03",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_15",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_16",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_15"
|
"bank_entry_id": "a1bank_en_v1_daily_life_grammar_15",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_daily_life_grammar_02",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_03",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_11",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_16",
|
||||||
|
"a1bank_en_v1_daily_life_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -2306,7 +2637,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_06"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -2426,11 +2760,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_06"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_06"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_06",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_05"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -2484,11 +2824,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_08"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_08",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_09"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_09"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_09",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_08"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -2538,7 +2884,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_01"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -2596,7 +2945,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_06"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_06",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_05"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -2650,7 +3002,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_04"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_04",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_20"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -2704,7 +3059,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_05",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_06"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -2758,11 +3116,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_09"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_09",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_08"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_20"
|
"bank_entry_id": "a1bank_en_v1_food_shopping_grammar_20",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_food_shopping_grammar_04"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "write",
|
"phase": "write",
|
||||||
@@ -2916,7 +3280,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_home_city_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_home_city_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_home_city_grammar_01"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -3082,7 +3449,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_home_city_grammar_02"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -3194,7 +3564,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_home_city_grammar_02"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -3248,7 +3621,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_home_city_grammar_02"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
@@ -3298,11 +3674,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01"
|
"bank_entry_id": "a1bank_en_v1_home_city_grammar_01",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_home_city_grammar_02"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
"bank_entry_id": "a1bank_en_v1_home_city_grammar_02"
|
"bank_entry_id": "a1bank_en_v1_home_city_grammar_02",
|
||||||
|
"alternatives": [
|
||||||
|
"a1bank_en_v1_home_city_grammar_01"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"phase": "grammar",
|
"phase": "grammar",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export type AdaptiveTask = {
|
|||||||
answer_key?: { correct_option_id?: string; reference_answer?: string; reference_answer_language?: string; explanation: string; rubric: string[] };
|
answer_key?: { correct_option_id?: string; reference_answer?: string; reference_answer_language?: string; explanation: string; rubric: string[] };
|
||||||
};
|
};
|
||||||
export type AdaptiveAttempt = {
|
export type AdaptiveAttempt = {
|
||||||
id: string; task_id: string; answer: string; status: 'pending' | 'graded' | 'failed' | 'ungraded'; demo: boolean; exam_id?: string;
|
id: string; created_at?: string; task_id: string; answer: string; status: 'pending' | 'graded' | 'failed' | 'ungraded'; demo: boolean; exam_id?: string;
|
||||||
evaluation?: { score: number; verdict: string; feedback: string; issues: string[] };
|
evaluation?: { score: number; verdict: string; feedback: string; issues: string[] };
|
||||||
speech?: PronunciationResult;
|
speech?: PronunciationResult;
|
||||||
};
|
};
|
||||||
@@ -25,7 +25,7 @@ export type CourseAnalysis = {
|
|||||||
summary: string; facts_version: number; recommended_module_id: string;
|
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 }[];
|
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 SequenceRecommendation = { selection_revision?: string; practice_reason?: string; reused_steps: number; 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 = {
|
export type CourseCatalog = {
|
||||||
sequence_recommendations?: Record<string, SequenceRecommendation>;
|
sequence_recommendations?: Record<string, SequenceRecommendation>;
|
||||||
native_language?: string; native_languages?: string[]; exam_available?: boolean;
|
native_language?: string; native_languages?: string[]; exam_available?: boolean;
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ import { useEffect, useRef, useState } from 'react';
|
|||||||
import { answerCourseAudio, answerCourseTask, courseRequestID, getAdaptiveAudio, type AdaptiveAttempt, type AdaptiveTask } from '../api/adaptive';
|
import { answerCourseAudio, answerCourseTask, courseRequestID, getAdaptiveAudio, type AdaptiveAttempt, type AdaptiveTask } from '../api/adaptive';
|
||||||
import { AudioRecorder } from './AudioRecorder';
|
import { AudioRecorder } from './AudioRecorder';
|
||||||
|
|
||||||
type Props = { task: AdaptiveTask; attempt: AdaptiveAttempt | null; locked: boolean; onAttempt: (attempt: AdaptiveAttempt) => void; onBusy: (value: boolean) => void; onRecording: (value: boolean) => void };
|
type Props = { previousAttempt?: boolean; task: AdaptiveTask; attempt: AdaptiveAttempt | null; locked: boolean; onAttempt: (attempt: AdaptiveAttempt) => void; onBusy: (value: boolean) => void; onRecording: (value: boolean) => void };
|
||||||
export function AdaptiveExercise({ task, attempt, locked, onAttempt, onRecording, onBusy }: Props) {
|
export function AdaptiveExercise({ task, attempt, locked, onAttempt, onRecording, onBusy, previousAttempt = false }: Props) {
|
||||||
const { t } = useI18n();
|
const { t, language } = useI18n();
|
||||||
|
const FeedbackContainer = previousAttempt ? 'details' : 'div';
|
||||||
const courseSkillNames = useCourseSkillNames();
|
const courseSkillNames = useCourseSkillNames();
|
||||||
const [answer, setAnswer] = useState('');
|
const [answer, setAnswer] = useState('');
|
||||||
const [recording, setRecording] = useState(false);
|
const [recording, setRecording] = useState(false);
|
||||||
@@ -58,12 +59,14 @@ export function AdaptiveExercise({ task, attempt, locked, onAttempt, onRecording
|
|||||||
</>}
|
</>}
|
||||||
<button type="button" className="primary-button" onClick={() => void submit()} disabled={disabled || recording || (isSpeech ? !audio : !answer.trim())}>{busy ? t('ui.processing_answer') : task.exam_id ? t('ui.save_test_answer') : t('ui.check_answer')}</button>
|
<button type="button" className="primary-button" onClick={() => void submit()} disabled={disabled || recording || (isSpeech ? !audio : !answer.trim())}>{busy ? t('ui.processing_answer') : task.exam_id ? t('ui.save_test_answer') : t('ui.check_answer')}</button>
|
||||||
{error && <p className="form-error" role="alert">{error}</p>}
|
{error && <p className="form-error" role="alert">{error}</p>}
|
||||||
{attempt && <div className="course-feedback" role="status">
|
{attempt && <FeedbackContainer className="course-feedback" role={previousAttempt ? undefined : 'status'}>
|
||||||
|
{previousAttempt && <summary>{t('sequence.previousAttempt', { date: attempt.created_at ? new Date(attempt.created_at).toLocaleString(language) : '' })}</summary>}
|
||||||
|
{previousAttempt && <p>{t('sequence.previousNotice')}</p>}
|
||||||
{attempt.demo && <p>{t('ui.demo_measurement_does_not_count_as_learning_evidence')}</p>}
|
{attempt.demo && <p>{t('ui.demo_measurement_does_not_count_as_learning_evidence')}</p>}
|
||||||
{task.exam_id && !attempt.evaluation ? <p>{t('ui.test_answer_saved_feedback_appears_once_all_twelve_answers_have')}</p> : attempt.status === 'pending' ? <p>{t('ui.answer_saved_the_teacher_agent_is_evaluating_it')}</p> : attempt.status === 'ungraded' ? <p>{t('ui.answer_saved_without_a_grade_you_can_request_an_ai')}</p> : attempt.status === 'failed' ? <p>{t('ui.evaluation_is_still_pending_you_can_request_it_again')}</p> : attempt.evaluation && <><strong>{task.kind==='free_speech'?t('ui.content_and_language'):''}{Math.round(attempt.evaluation.score)} / 100 · {attempt.evaluation.verdict === 'correct' ? t('ui.correct') : attempt.evaluation.verdict === 'partial' ? t('ui.partially_correct') : t('ui.keep_practising')}</strong><p>{attempt.evaluation.feedback}</p>{attempt.evaluation.issues?.map((issue, i) => <p key={i}>{issue}</p>)}</>}
|
{task.exam_id && !attempt.evaluation ? <p>{t('ui.test_answer_saved_feedback_appears_once_all_twelve_answers_have')}</p> : attempt.status === 'pending' ? <p>{t('ui.answer_saved_the_teacher_agent_is_evaluating_it')}</p> : attempt.status === 'ungraded' ? <p>{t('ui.answer_saved_without_a_grade_you_can_request_an_ai')}</p> : attempt.status === 'failed' ? <p>{t('ui.evaluation_is_still_pending_you_can_request_it_again')}</p> : attempt.evaluation && <><strong>{task.kind==='free_speech'?t('ui.content_and_language'):''}{Math.round(attempt.evaluation.score)} / 100 · {attempt.evaluation.verdict === 'correct' ? t('ui.correct') : attempt.evaluation.verdict === 'partial' ? t('ui.partially_correct') : t('ui.keep_practising')}</strong><p>{attempt.evaluation.feedback}</p>{attempt.evaluation.issues?.map((issue, i) => <p key={i}>{issue}</p>)}</>}
|
||||||
{task.kind==='free_speech'&&<p>{t('ui.recognised_text')} {attempt.answer}</p>}
|
{task.kind==='free_speech'&&<p>{t('ui.recognised_text')} {attempt.answer}</p>}
|
||||||
{attempt.speech && <p>{t('ui.pronunciation')} {Math.round(attempt.speech.overall_score)} / 100</p>}
|
{attempt.speech && <p>{t('ui.pronunciation')} {Math.round(attempt.speech.overall_score)} / 100</p>}
|
||||||
{task.answer_key && <><p>{task.answer_key.explanation}</p>{attempt?.status === 'ungraded' && <><p>{t('ui.for_self_comparison_without_grading')}</p><ul>{task.answer_key.rubric?.map((rule,i)=><li key={i}>{rule}</li>)}</ul></>}{task.answer_key.reference_answer && <p>{t('ui.example')} <span lang={task.answer_key.reference_answer_language ?? task.target_language} dir="auto">{task.answer_key.reference_answer}</span></p>}{task.audio_text && <p>{t('ui.listening_transcript')} <span lang={task.target_language} dir="auto">{task.audio_text}</span></p>}</>}
|
{task.answer_key && <><p>{task.answer_key.explanation}</p>{attempt?.status === 'ungraded' && <><p>{t('ui.for_self_comparison_without_grading')}</p><ul>{task.answer_key.rubric?.map((rule,i)=><li key={i}>{rule}</li>)}</ul></>}{task.answer_key.reference_answer && <p>{t('ui.example')} <span lang={task.answer_key.reference_answer_language ?? task.target_language} dir="auto">{task.answer_key.reference_answer}</span></p>}{task.audio_text && <p>{t('ui.listening_transcript')} <span lang={task.target_language} dir="auto">{task.audio_text}</span></p>}</>}
|
||||||
</div>}
|
</FeedbackContainer>}
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -449,7 +449,7 @@
|
|||||||
"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.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.position": "Thema {topic} von {topics} · Schritt {step} von {steps}",
|
||||||
"sequence.skip": "Diesen Schritt überspringen",
|
"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.complete": "Die Schritte dieses Lernwegs sind bearbeitet, anhand früherer Übung berücksichtigt oder ausdrücklich ü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.listen": "Zuerst hören",
|
||||||
"sequence.phase.vocabulary": "Wörter im Zusammenhang verstehen",
|
"sequence.phase.vocabulary": "Wörter im Zusammenhang verstehen",
|
||||||
"sequence.phase.read": "Ein passendes Beispiel lesen",
|
"sequence.phase.read": "Ein passendes Beispiel lesen",
|
||||||
@@ -458,5 +458,10 @@
|
|||||||
"sequence.phase.write": "Mit Vorgabe schreiben",
|
"sequence.phase.write": "Mit Vorgabe schreiben",
|
||||||
"sequence.phase.compose": "Selbstständig formulieren",
|
"sequence.phase.compose": "Selbstständig formulieren",
|
||||||
"sequence.phase.speak": "Das Thema frei sprechen",
|
"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."
|
"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.",
|
||||||
|
"sequence.transfer": "Du hast die Grundlage bereits gut geübt. Prüfe dasselbe Satzmuster jetzt an einem neuen Beispiel.",
|
||||||
|
"sequence.refresh": "Diese Grundlage wird noch einmal aufgefrischt: Die bisherigen Ergebnisse sind älter oder reichen für weniger Wiederholungen noch nicht aus.",
|
||||||
|
"sequence.reused": "Bereits gut bearbeitete Grundlagen berücksichtigt: {count}. Dafür entstehen keine neuen Antworten oder Leistungsnachweise.",
|
||||||
|
"sequence.previousAttempt": "Bewertung deines vorherigen Versuchs · {date}",
|
||||||
|
"sequence.previousNotice": "Diese Bewertung gehört zu einer früheren Antwort. Für diesen Übungsdurchgang kannst du erneut antworten; die frühere Bewertung bleibt gespeichert."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -449,7 +449,7 @@
|
|||||||
"sequence.intro": "Упражнения последовательно раскрывают одну тему. Ответьте и нажмите «Следующее задание». Можно пропустить шаг или выбрать направление обучения напрямую. Выполненное задание ещё не означает освоение материала.",
|
"sequence.intro": "Упражнения последовательно раскрывают одну тему. Ответьте и нажмите «Следующее задание». Можно пропустить шаг или выбрать направление обучения напрямую. Выполненное задание ещё не означает освоение материала.",
|
||||||
"sequence.position": "Тема {topic} из {topics} · Шаг {step} из {steps}",
|
"sequence.position": "Тема {topic} из {topics} · Шаг {step} из {steps}",
|
||||||
"sequence.skip": "Пропустить этот шаг",
|
"sequence.skip": "Пропустить этот шаг",
|
||||||
"sequence.complete": "Вы прошли этот учебный путь или пропустили отдельные шаги. Дальнейшие задания подбираются по сохранённым оценкам. Это ещё не подтверждает освоение всего материала.",
|
"sequence.complete": "Шаги этого учебного пути выполнены, учтены по предыдущей практике или явно пропущены. Дальнейшие задания подбираются по сохранённым оценкам. Это ещё не подтверждает освоение всего материала.",
|
||||||
"sequence.phase.listen": "Сначала послушать",
|
"sequence.phase.listen": "Сначала послушать",
|
||||||
"sequence.phase.vocabulary": "Понять слова в контексте",
|
"sequence.phase.vocabulary": "Понять слова в контексте",
|
||||||
"sequence.phase.read": "Прочитать пример по теме",
|
"sequence.phase.read": "Прочитать пример по теме",
|
||||||
@@ -458,5 +458,10 @@
|
|||||||
"sequence.phase.write": "Написать по заданию",
|
"sequence.phase.write": "Написать по заданию",
|
||||||
"sequence.phase.compose": "Самостоятельно составить текст",
|
"sequence.phase.compose": "Самостоятельно составить текст",
|
||||||
"sequence.phase.speak": "Самостоятельно рассказать по теме",
|
"sequence.phase.speak": "Самостоятельно рассказать по теме",
|
||||||
"sequence.review": "В последнем ответе была ошибка. Повторите этот шаг ещё раз или пропустите его. После этого учебный путь продолжится независимо от балла."
|
"sequence.review": "В последнем ответе была ошибка. Повторите этот шаг ещё раз или пропустите его. После этого учебный путь продолжится независимо от балла.",
|
||||||
|
"sequence.transfer": "Вы уже хорошо потренировали эту основу. Теперь проверьте ту же структуру предложения на новом примере.",
|
||||||
|
"sequence.refresh": "Повторим эту основу: предыдущие результаты устарели или их пока недостаточно, чтобы сократить повторения.",
|
||||||
|
"sequence.reused": "Учтены ранее хорошо выполненные базовые шаги: {count}. Новые ответы или подтверждения освоения при этом не создаются.",
|
||||||
|
"sequence.previousAttempt": "Оценка предыдущей попытки · {date}",
|
||||||
|
"sequence.previousNotice": "Эта оценка относится к предыдущему ответу. В текущем упражнении можно ответить заново; прежняя оценка сохраняется."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,6 +172,8 @@ export function CoursePage() {
|
|||||||
const selected = catalog.modules.find((m) => m.id === moduleID);
|
const selected = catalog.modules.find((m) => m.id === moduleID);
|
||||||
const recommendation = catalog.sequence_recommendations?.[moduleID];
|
const recommendation = catalog.sequence_recommendations?.[moduleID];
|
||||||
const phases: Record<string, MessageKey> = { 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 phases: Record<string, MessageKey> = { 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 practiceReasons: Record<string, MessageKey> = { transfer: 'sequence.transfer', refresh: 'sequence.refresh' };
|
||||||
|
const previousAttempt = Boolean(task && !task.exam_id && catalog.sequence_recommendations?.[task.module_id]?.task_id === task.id && catalog.sequence_recommendations?.[task.module_id]?.needs_answer);
|
||||||
const analysis = catalog.analysis?.modules.find((m) => m.module_id === moduleID);
|
const analysis = catalog.analysis?.modules.find((m) => m.module_id === moduleID);
|
||||||
const progress = catalog.progress.filter((p) => p.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));
|
const inventory=(catalog.bank??[]).filter(p=>p.module_id===moduleID && (!skill||p.skill===skill));
|
||||||
@@ -201,8 +203,10 @@ export function CoursePage() {
|
|||||||
<p>{t('sequence.position', { topic: recommendation.topic, topics: recommendation.topics, step: recommendation.step, steps: recommendation.steps })} · {recommendation.phase && phases[recommendation.phase] ? t(phases[recommendation.phase]) : ''}</p>
|
<p>{t('sequence.position', { topic: recommendation.topic, topics: recommendation.topics, step: recommendation.step, steps: recommendation.steps })} · {recommendation.phase && phases[recommendation.phase] ? t(phases[recommendation.phase]) : ''}</p>
|
||||||
<p className="muted">{t('sequence.intro')}</p>
|
<p className="muted">{t('sequence.intro')}</p>
|
||||||
{recommendation.review && <p role="status">{t('sequence.review')}</p>}
|
{recommendation.review && <p role="status">{t('sequence.review')}</p>}
|
||||||
|
{!recommendation.review && recommendation.practice_reason && practiceReasons[recommendation.practice_reason] && <p role="status">{t(practiceReasons[recommendation.practice_reason])}</p>}
|
||||||
{recommendation.task_id === task?.id && recommendation.needs_answer && <button type="button" className="ghost-button" disabled={locked} onClick={() => void generate(true)}>{t('sequence.skip')}</button>}
|
{recommendation.task_id === task?.id && recommendation.needs_answer && <button type="button" className="ghost-button" disabled={locked} onClick={() => void generate(true)}>{t('sequence.skip')}</button>}
|
||||||
</>}
|
</>}
|
||||||
|
{recommendation.reused_steps > 0 && <p className="muted">{t('sequence.reused', { count: recommendation.reused_steps })}</p>}
|
||||||
</div>}
|
</div>}
|
||||||
<div className="action-row"><button type="button" className="primary-button" disabled={locked || noVariant} onClick={() => void generate()}>{jobRunning ? t('ui.preparing_exercise') : t('ui.next_exercise')}</button>{selected.key === 'review_test' && <button type="button" className="ghost-button" disabled={locked || catalog.exam_available === false} onClick={() => void startExam()}>{t('ui.start_a_new_a1_test_12_questions')}</button>}</div>
|
<div className="action-row"><button type="button" className="primary-button" disabled={locked || noVariant} onClick={() => void generate()}>{jobRunning ? t('ui.preparing_exercise') : t('ui.next_exercise')}</button>{selected.key === 'review_test' && <button type="button" className="ghost-button" disabled={locked || catalog.exam_available === false} onClick={() => void startExam()}>{t('ui.start_a_new_a1_test_12_questions')}</button>}</div>
|
||||||
{noVariant && <p role="status">{t('course.noVariant')}</p>}
|
{noVariant && <p role="status">{t('course.noVariant')}</p>}
|
||||||
@@ -219,7 +223,7 @@ export function CoursePage() {
|
|||||||
</section>}
|
</section>}
|
||||||
<div className="course-layout"><nav className="panel course-task-list" aria-label={t('ui.saved_exercises')}><h2>{t('ui.your_exercises')}</h2>{history.length === 0 && <p className="muted">{t('ui.your_selected_exercises_are_saved_here')}</p>}{history.map((item) => <button type="button" className={task?.id === item.id ? 'course-task active' : 'course-task'} key={item.id} disabled={recording || submitting || busy} onClick={() => { setExam(null); void openTask(item.id).catch(showError); }}><span>{courseSkillNames[item.skill]} · {item.prompt.slice(0, 65)}</span></button>)}{hasMore && <button type="button" disabled={busy} onClick={() => void loadMore()}>{t('ui.load_more_exercises')}</button>}
|
<div className="course-layout"><nav className="panel course-task-list" aria-label={t('ui.saved_exercises')}><h2>{t('ui.your_exercises')}</h2>{history.length === 0 && <p className="muted">{t('ui.your_selected_exercises_are_saved_here')}</p>}{history.map((item) => <button type="button" className={task?.id === item.id ? 'course-task active' : 'course-task'} key={item.id} disabled={recording || submitting || busy} onClick={() => { setExam(null); void openTask(item.id).catch(showError); }}><span>{courseSkillNames[item.skill]} · {item.prompt.slice(0, 65)}</span></button>)}{hasMore && <button type="button" disabled={busy} onClick={() => void loadMore()}>{t('ui.load_more_exercises')}</button>}
|
||||||
{catalog.exams.map((item) => <button type="button" key={item.id} disabled={locked} className="course-task" onClick={() => void getCourseExam(item.id).then((value) => { setExam(value); if (value.tasks[0]) void openTask(value.tasks[0].id).catch(showError); }).catch(showError)}>{t('ui.a1_test_2')} {item.status === 'completed' ? t('ui.result') : t('ui.resume')}</button>)}
|
{catalog.exams.map((item) => <button type="button" key={item.id} disabled={locked} className="course-task" onClick={() => void getCourseExam(item.id).then((value) => { setExam(value); if (value.tasks[0]) void openTask(value.tasks[0].id).catch(showError); }).catch(showError)}>{t('ui.a1_test_2')} {item.status === 'completed' ? t('ui.result') : t('ui.resume')}</button>)}
|
||||||
</nav><section ref={exerciseRef} className="panel course-exercise" aria-label={t('ui.current_course_exercise')} aria-live="polite">{task ? <><AdaptiveExercise key={task.id} task={task} attempt={attempt} locked={jobRunning} onAttempt={(a) => void receivedAttempt(a)} onRecording={setRecording} onBusy={setSubmitting} />{(attempt?.status === 'failed' || attempt?.status === 'ungraded') && <button type="button" disabled={catalog.task_mode === 'bank' && !catalog.grading_available} onClick={() => void retryCourseAttempt(attempt.id).then(() => setAttempt({ ...attempt, status: 'pending' })).catch(showError)}>{attempt.status === 'ungraded' ? t('ui.request_evaluation') : t('ui.request_evaluation_again')}</button>}{attempt?.status === 'ungraded' && !catalog.grading_available && <p className="muted">{t('ui.ai_evaluation_is_currently_unavailable_you_can_compare_your_answer')}</p>}{evaluating && <p className="muted">{t('ui.your_answer_remains_saved_even_if_you_leave_this_page')}</p>}</> : <p className="muted">{t('ui.choose_a_module_and_request_your_next_exercise')}</p>}</section></div>
|
</nav><section ref={exerciseRef} className="panel course-exercise" aria-label={t('ui.current_course_exercise')} aria-live="polite">{task ? <><AdaptiveExercise key={task.id} previousAttempt={previousAttempt} task={task} attempt={attempt} locked={jobRunning} onAttempt={(a) => void receivedAttempt(a)} onRecording={setRecording} onBusy={setSubmitting} />{(attempt?.status === 'failed' || attempt?.status === 'ungraded') && <button type="button" disabled={catalog.task_mode === 'bank' && !catalog.grading_available} onClick={() => void retryCourseAttempt(attempt.id).then(() => setAttempt({ ...attempt, status: 'pending' })).catch(showError)}>{attempt.status === 'ungraded' ? t('ui.request_evaluation') : t('ui.request_evaluation_again')}</button>}{attempt?.status === 'ungraded' && !catalog.grading_available && <p className="muted">{t('ui.ai_evaluation_is_currently_unavailable_you_can_compare_your_answer')}</p>}{evaluating && <p className="muted">{t('ui.your_answer_remains_saved_even_if_you_leave_this_page')}</p>}</> : <p className="muted">{t('ui.choose_a_module_and_request_your_next_exercise')}</p>}</section></div>
|
||||||
</>}
|
</>}
|
||||||
<button type="button" className="link-button" disabled={locked} onClick={() => setLegacy(true)}>{t('ui.open_the_original_fixed_course')}</button>
|
<button type="button" className="link-button" disabled={locked} onClick={() => setLegacy(true)}>{t('ui.open_the_original_fixed_course')}</button>
|
||||||
</div>;
|
</div>;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ bleibt nach einem Wechsel über dieselbe Request-ID unverändert abrufbar.
|
|||||||
|
|
||||||
`course-sequences.e2e.cjs` prüft auf Deutsch und Russisch den empfohlenen
|
`course-sequences.e2e.cjs` prüft auf Deutsch und Russisch den empfohlenen
|
||||||
Lernweg mit Höreinstieg, Wiederaufnahme nach Reload, unveränderten Schritt bei
|
Lernweg mit Höreinstieg, Wiederaufnahme nach Reload, unveränderten Schritt bei
|
||||||
bloßem Weiterklicken, explizites Überspringen, freie Bereichswahl, Fortsetzung
|
bloßem Weiterklicken, explizites Überspringen, freie Bereichswahl, klar eingeklappte Bewertungen vorheriger Versuche, Fortsetzung
|
||||||
nach einer Antwort und Erhalt beim Wechsel der Muttersprache. Die Kursbank-Fixture
|
nach einer Antwort und Erhalt beim Wechsel der Muttersprache. Die Kursbank-Fixture
|
||||||
startet ihn sequenziell nach dem Varianten-Smoke. Keine Modellaufrufe.
|
startet ihn sequenziell nach dem Varianten-Smoke. Keine Modellaufrufe.
|
||||||
Die Go-Datenbanktests prüfen zusätzlich den Weg bis zur gemeldeten Aufgabe über
|
Die Go-Datenbanktests prüfen zusätzlich den Weg bis zur gemeldeten Aufgabe über
|
||||||
@@ -108,3 +108,12 @@ Azure-Audiofunktion. Live-Tests müssen im Adminbereich bewusst ausgelöst werde
|
|||||||
`adaptive-course.e2e.cjs` und `course-agent.fixture.py` sind historische
|
`adaptive-course.e2e.cjs` und `course-agent.fixture.py` sind historische
|
||||||
Flowise-Smokes des früheren Stands. Die neue API verwendet deren Flowise-Endpunkt
|
Flowise-Smokes des früheren Stands. Die neue API verwendet deren Flowise-Endpunkt
|
||||||
nicht mehr; für den aktuellen Arbeitsbaum die obige Prüfung verwenden.
|
nicht mehr; für den aktuellen Arbeitsbaum die obige Prüfung verwenden.
|
||||||
|
|
||||||
|
Die Tests `TestFoundationRepetitionPolicy` und
|
||||||
|
`TestLearningPathAdaptsOnlyFromOwnedGradedEvidence` prüfen unmittelbare
|
||||||
|
Doppelwiederholung, zeitversetzte gute Antworten, unbekannte freigegebene
|
||||||
|
Grammatikbeispiele, ältere/neuerdings falsche Ergebnisse, unbenotete und
|
||||||
|
Demoantworten sowie Nutzertrennung. Derselbe gewählte Transfer bleibt bei neuen
|
||||||
|
Anfragen und beim Wechsel der Muttersprache erhalten. Die Anzahl bewerteter
|
||||||
|
Antworten darf durch die Auswahl nie steigen. Unveränderte thematische
|
||||||
|
Vorbereitung bis zur Zwei-Freunde-Aufgabe wird weiterhin separat geprüft.
|
||||||
|
|||||||
@@ -26,6 +26,13 @@ const assert=require('node:assert/strict'),crypto=require('node:crypto'),fs=requ
|
|||||||
}
|
}
|
||||||
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 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');
|
const same=await next();assert.equal(same.task.id,first.task.id,'Clicking Next alone must not count as practice');
|
||||||
|
const listeningBank=JSON.parse(fs.readFileSync('../api/internal/store/coursebank/en-US/a1-v2/introductions.listening.json'));
|
||||||
|
const correct=listeningBank.find(e=>e.id===first.task.canonical_task_id).task.answer_key.correct_option_id;
|
||||||
|
const wrong=first.task.options.find(o=>o.id!==correct).id;
|
||||||
|
const graded=await page.request.post(api+'/course/tasks/'+first.task.id+'/attempts',{headers,data:{request_id:crypto.randomUUID().replaceAll('-',''),answer:wrong}});assert.equal(graded.status(),201);
|
||||||
|
const review=await next();assert.equal(review.task.id,first.task.id);assert.equal(review.job.recommendation.review,true);
|
||||||
|
const previous=page.locator('details.course-feedback');await previous.locator('summary').waitFor();assert.equal(await previous.getAttribute('open'),null);assert((await previous.locator('summary').innerText()).includes(labels['sequence.previousAttempt'].split(' · ')[0]));
|
||||||
|
|
||||||
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();
|
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 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);
|
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);
|
||||||
|
|||||||
@@ -108,6 +108,22 @@ Quellen und Verhalten: [README](../README.md#a1-kurs).
|
|||||||
Bei ausdrücklich gewähltem Lernbereich, ausgeschöpftem Lernweg und im
|
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.
|
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.
|
||||||
|
|
||||||
|
### Weniger identische Grundlagenwiederholungen
|
||||||
|
|
||||||
|
Der thematische Lernweg berücksichtigt vorhandene echte Bewertungen, ohne neue
|
||||||
|
Modellaufrufe. Gute aktuelle Grundlagen führen bevorzugt zu einem unbekannten,
|
||||||
|
redaktionell freigegebenen Grammatikbeispiel desselben Satzmusters. Ist keine
|
||||||
|
solche neue Variante vorhanden, können kürzlich gut bearbeitete Grundlagen
|
||||||
|
berücksichtigt werden, statt sie identisch zu wiederholen. Konkrete Wortbedeutungen
|
||||||
|
werden nicht gegeneinander ausgetauscht. Bei älteren/uneinheitlichen Nachweisen
|
||||||
|
wird aufgefrischt; manuelle Bereichswahl und A1-Test bleiben unabhängig.
|
||||||
|
Zeiten, Mindestnachweise und Grenzen: [README](../README.md#a1-kurs).
|
||||||
|
|
||||||
|
Layoutrevision und Lernwegposition bleiben bestehen. Die ergänzten
|
||||||
|
Transferalternativen und ihre eigene Auswahlrevision sind im redaktionellen
|
||||||
|
Sequenz-Prüfvermerk gebunden. Keine Produktionsprofile, Budgets oder Messungen
|
||||||
|
werden verändert; ausgelassene Grundlagen sind keine zusätzlichen Leistungsnachweise.
|
||||||
|
|
||||||
### Offene Antworten und A1-Test
|
### Offene Antworten und A1-Test
|
||||||
|
|
||||||
Ohne verfügbaren Evaluator werden Text-/Sprachantworten mit Status `ungraded` gespeichert. Es entsteht keine erfundene Note und kein bewerteter Fortschritt. Bei Übungen zeigt die App nach Abgabe Beispielantwort und Rubrik zum Selbstvergleich. Echte Azure-Messwerte bleiben eigenständige Messwerte und ersetzen keine inhaltliche Benotung. Kein Modellaufruf für Analyse, Planung, Erstellung oder Testzusammenfassung im Bankbetrieb.
|
Ohne verfügbaren Evaluator werden Text-/Sprachantworten mit Status `ungraded` gespeichert. Es entsteht keine erfundene Note und kein bewerteter Fortschritt. Bei Übungen zeigt die App nach Abgabe Beispielantwort und Rubrik zum Selbstvergleich. Echte Azure-Messwerte bleiben eigenständige Messwerte und ersetzen keine inhaltliche Benotung. Kein Modellaufruf für Analyse, Planung, Erstellung oder Testzusammenfassung im Bankbetrieb.
|
||||||
|
|||||||
@@ -86,3 +86,37 @@ 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
|
changing the path requires a new revision. The 840 base entries and Russian
|
||||||
presentations are unchanged. Initial activation begins at the first topic without
|
presentations are unchanged. Initial activation begins at the first topic without
|
||||||
reinterpreting historical grades or rewriting existing assignments.
|
reinterpreting historical grades or rewriting existing assignments.
|
||||||
|
|
||||||
|
### Evidence-aware scaffold repetition
|
||||||
|
|
||||||
|
The additive `reused_steps` counter distinguishes earlier practice taken into
|
||||||
|
account from explicit skipping. Neither counter is graded evidence. The stored
|
||||||
|
`practice_reason` identifies foundation, transfer or refresh; recommendations
|
||||||
|
expose these fields and `selection_revision`. The step layout remains
|
||||||
|
`thematic-A1-v1`; selection metadata/policy is versioned separately, so this update
|
||||||
|
preserves existing cursors. Already active assignments remain stable, including a
|
||||||
|
chosen transfer example across request retries and native-language changes.
|
||||||
|
|
||||||
|
Editorial `alternatives` are allowed only for grammar choice tasks in the same
|
||||||
|
module and learning goal, with explicitly reviewed comparable sentence patterns.
|
||||||
|
There is no automatic replacement based on broad goal labels alone, nor any
|
||||||
|
replacement of vocabulary meanings. The new chosen example remains an ordinary
|
||||||
|
immutable assignment with its own original canonical/evidence identity.
|
||||||
|
|
||||||
|
Selection reads owned, non-demo answers scoped by target language and course
|
||||||
|
version, at most the latest 2,000 in a 30-day module window. Incomplete exam
|
||||||
|
answers/grades never influence it. The latest answer for each canonical item
|
||||||
|
must be graded and >=85, no older than seven days. Fresh exact-item success has
|
||||||
|
a 30-minute cooldown; after that, fewer repetitions require positive answers at
|
||||||
|
least 24 hours apart or, for grammar, three different approved examples with
|
||||||
|
recent positive latest answers. Locale variants and same-day repetitions do not
|
||||||
|
multiply distinct examples. Newer weak or ungraded answers block the item's
|
||||||
|
positive assumption. Unseen approved grammar examples take priority over reuse;
|
||||||
|
assignments in any exam are also excluded from being called unseen examples.
|
||||||
|
Only grammar/vocabulary scaffold positions may reuse earlier practice. The
|
||||||
|
remaining thematic stages, manual skill selection and exams retain their behavior.
|
||||||
|
No synthetic attempt, grade, progress event or pronunciation measurement is created.
|
||||||
|
|
||||||
|
The frontend folds prior feedback for an active presentation awaiting a new
|
||||||
|
answer into an explicitly labeled previous-attempt disclosure. Stored feedback,
|
||||||
|
answer keys and the existing exam disclosure rules are unchanged.
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
"reviewed": true,
|
"reviewed": true,
|
||||||
"sequence_count": 60,
|
"sequence_count": 60,
|
||||||
"reviewer": "Codex editorial pass",
|
"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.",
|
"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. Grammar transfer alternatives are explicitly grouped by comparable sentence patterns, not merely by module or broad skill. Different vocabulary meanings and spatial prepositions are not interchangeable. Step order and navigation revision remain unchanged.",
|
||||||
"sources": {
|
"sources": {
|
||||||
"sequence_sources.json": "f09b3b845fcaee948b0dca211f2c644e649597151563e4c7b8d89bb1aad1ad2a",
|
"sequence_sources.json": "6d45bad571ff3e7c3daa98b8b2a384582a74b12a0e7eac3341ac474761d9f3b5",
|
||||||
"sequences.py": "a20f985ccf180b66b537692eb38fc81061c63e8e32aa9c2ff7ace61b6e43f72a",
|
"sequences.py": "201ae437675b0d83d7c5eae94dd5839a7f61df99aa4c578610315489ef7f22b1",
|
||||||
"daily_life.grammar.txt": "0b84ee5b65e2fdf63add826c372c1438215a48c9731c266601ba9160e0e25192",
|
"daily_life.grammar.txt": "0b84ee5b65e2fdf63add826c372c1438215a48c9731c266601ba9160e0e25192",
|
||||||
"daily_life.stories.txt": "62bd24776fd4bbbdf7bf5e926f1452f7720e8b061394dced91ff7cc46aed2e03",
|
"daily_life.stories.txt": "62bd24776fd4bbbdf7bf5e926f1452f7720e8b061394dced91ff7cc46aed2e03",
|
||||||
"daily_life.vocabulary.txt": "4db8b0cf43b1f154e315cefe82970e32e410e61edb047d517ad7310e5aff23aa",
|
"daily_life.vocabulary.txt": "4db8b0cf43b1f154e315cefe82970e32e410e61edb047d517ad7310e5aff23aa",
|
||||||
@@ -26,5 +26,6 @@
|
|||||||
"numbers_time.stories.txt": "1127477a8f80c613f94c838c0c80d5c9176e1a6eef7bcc8a72b4e95d5cb1245f",
|
"numbers_time.stories.txt": "1127477a8f80c613f94c838c0c80d5c9176e1a6eef7bcc8a72b4e95d5cb1245f",
|
||||||
"numbers_time.vocabulary.txt": "fa2d4b1284f3d89789d3b25310739f62356361d090489f995d8734a306fbeef0",
|
"numbers_time.vocabulary.txt": "fa2d4b1284f3d89789d3b25310739f62356361d090489f995d8734a306fbeef0",
|
||||||
"open_instructions.json": "dc6e2239a146080c8eb2f6d54f3877c5e01afaa9d4b196104184bb6623f24728"
|
"open_instructions.json": "dc6e2239a146080c8eb2f6d54f3877c5e01afaa9d4b196104184bb6623f24728"
|
||||||
}
|
},
|
||||||
|
"selection_revision": "adaptive-repetition-v1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1233,5 +1233,131 @@
|
|||||||
"Что есть и чего нет в городе"
|
"Что есть и чего нет в городе"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"selection_revision": "adaptive-repetition-v1",
|
||||||
|
"grammar_transfer_groups": {
|
||||||
|
"introductions": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
9,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
[
|
||||||
|
6,
|
||||||
|
13,
|
||||||
|
14,
|
||||||
|
19
|
||||||
|
],
|
||||||
|
[
|
||||||
|
8,
|
||||||
|
12
|
||||||
|
],
|
||||||
|
[
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
[
|
||||||
|
11,
|
||||||
|
18
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"family": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
6,
|
||||||
|
9,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
[
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
13
|
||||||
|
],
|
||||||
|
[
|
||||||
|
8,
|
||||||
|
14,
|
||||||
|
15
|
||||||
|
],
|
||||||
|
[
|
||||||
|
10,
|
||||||
|
11
|
||||||
|
],
|
||||||
|
[
|
||||||
|
12,
|
||||||
|
18
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"numbers_time": [
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
12
|
||||||
|
],
|
||||||
|
[
|
||||||
|
4,
|
||||||
|
13
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"daily_life": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
4,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
11,
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
[
|
||||||
|
6,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7,
|
||||||
|
8
|
||||||
|
],
|
||||||
|
[
|
||||||
|
17,
|
||||||
|
18
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"food_shopping": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
4,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
[
|
||||||
|
8,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
[
|
||||||
|
5,
|
||||||
|
6
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"home_city": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
12,
|
||||||
|
13
|
||||||
|
]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,17 @@ def compile_sequences():
|
|||||||
entry = entries[f'{module}.{skill}.json'][number - 1]
|
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]
|
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
|
assert entry['task']['kind'] == expected
|
||||||
steps.append(dict(phase=phase, bank_entry_id=entry['id']))
|
step = dict(phase=phase, bank_entry_id=entry['id'])
|
||||||
|
if phase == 'grammar':
|
||||||
|
group = next((g for g in source['grammar_transfer_groups'].get(module, []) if number in g), [])
|
||||||
|
alternatives = [entries[f'{module}.grammar.json'][n - 1] for n in group if n != number]
|
||||||
|
assert all(a['learning_goal_id'] == entry['learning_goal_id'] for a in alternatives)
|
||||||
|
if alternatives:
|
||||||
|
step['alternatives'] = [a['id'] for a in alternatives]
|
||||||
|
steps.append(step)
|
||||||
sequences.append(dict(id=f'{module}_scene_{scene:02d}', module_id=f'a1_{module}_v1', titles={'de-DE':de,'ru-RU':ru}, steps=steps))
|
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
|
assert len(sequences) == review['sequence_count'] == 60
|
||||||
return dict(revision=source['revision'], editorial_review_sha256=hashlib.sha256(review_bytes).hexdigest(), sequences=sequences)
|
return dict(revision=source['revision'], selection_revision=source['selection_revision'], editorial_review_sha256=hashlib.sha256(review_bytes).hexdigest(), sequences=sequences)
|
||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
@@ -43,6 +50,15 @@ def audit():
|
|||||||
data = (DEST/'sequences.json').read_bytes()
|
data = (DEST/'sequences.json').read_bytes()
|
||||||
assert hashlib.sha256(data).hexdigest() == json.loads((DEST/'sequence_manifest.json').read_text())['sha256']
|
assert hashlib.sha256(data).hexdigest() == json.loads((DEST/'sequence_manifest.json').read_text())['sha256']
|
||||||
assert json.loads(data) == compile_sequences()
|
assert json.loads(data) == compile_sequences()
|
||||||
|
base = {e['id']: e for p in (DEST/'en-US/a1-v2').glob('*.json') if p.name != 'manifest.json' for e in json.loads(p.read_text())}
|
||||||
|
for seq in json.loads(data)['sequences']:
|
||||||
|
for step in seq['steps']:
|
||||||
|
for alternate in step.get('alternatives', []):
|
||||||
|
original, other = base[step['bank_entry_id']], base[alternate]
|
||||||
|
assert step['phase'] == 'grammar' and alternate != original['id']
|
||||||
|
assert original['learning_goal_id'] == other['learning_goal_id']
|
||||||
|
assert original['task']['module_id'] == other['task']['module_id']
|
||||||
|
assert other['task']['kind'] == 'choice' and other['task']['skill'] == 'grammar'
|
||||||
for seq in json.loads(data)['sequences']:
|
for seq in json.loads(data)['sequences']:
|
||||||
assert seq['steps'][0]['phase']=='listen' and seq['steps'][-1]['phase']=='speak'
|
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 all(seq['titles'][lang] for lang in ('de-DE','ru-RU'))
|
||||||
|
|||||||
Reference in New Issue
Block a user