feat: 完善听力口语辅助状态记录、练习分块与复习抽查间隔机制
This commit is contained in:
@@ -63,17 +63,25 @@ void main() {
|
||||
expect(await store.read(), isNull);
|
||||
const first = '''{
|
||||
"revision": 1,
|
||||
"attemptEvidence": [{"id":"a1","itemId":"A0-P01","taskId":"t1","skill":"speaking","inputMode":"speechToText","outcome":"independentSuccess","createdAt":"2026-09-14T00:00:00.000Z","assisted":false,"variantIndex":0,"originalTranscript":"Hello","transcriptConfirmed":true,"transcriptEdited":false}],
|
||||
"attemptEvidence": [{"id":"a1","itemId":"A0-P01","taskId":"t1","skill":"speaking","inputMode":"speechToText","outcome":"independentSuccess","createdAt":"2026-09-14T00:00:00.000Z","assisted":false,"variantIndex":0,"originalTranscript":"Hello","transcriptConfirmed":true,"transcriptEdited":false,"firstTry":true,"attemptCount":1,"listeningSupport":"slow","usedSentenceBuild":true}],
|
||||
"mastery": [{"id":"A0-P01","label":"Hello","status":"recognize","checkpoint":1,"needsReview":false}],
|
||||
"reviews": [{"id":"A0-P01","dueAt":"2026-09-15T00:00:00.000Z","attempts":1,"successfulReviews":1,"variantIndex":0}],
|
||||
"temporaryLexicon": [{"query":"library","definition":"图书馆","provider":"compatible","model":"demo","createdAt":"2026-09-14T00:00:00.000Z"}],
|
||||
"lessonStep":"speaking", "activeLessonId":"a0-01"
|
||||
"lessonStep":"speaking", "activeLessonId":"a0-01",
|
||||
"listeningAudioPlayed":true,"listeningSupport":"slow","listeningAttempts":1,
|
||||
"sentenceBuildUsed":true,"sentenceBuildIndex":2
|
||||
}''';
|
||||
await store.write(first);
|
||||
final restored =
|
||||
jsonDecode((await store.read())!) as Map<String, dynamic>;
|
||||
expect(restored['lessonStep'], 'speaking');
|
||||
expect(restored['attemptEvidence'], hasLength(1));
|
||||
expect(restored['attemptEvidence'][0]['firstTry'], isTrue);
|
||||
expect(restored['attemptEvidence'][0]['attemptCount'], 1);
|
||||
expect(restored['attemptEvidence'][0]['listeningSupport'], 'slow');
|
||||
expect(restored['attemptEvidence'][0]['usedSentenceBuild'], isTrue);
|
||||
expect(restored['listeningSupport'], 'slow');
|
||||
expect(restored['sentenceBuildIndex'], 2);
|
||||
expect(restored['mastery'], hasLength(1));
|
||||
expect(
|
||||
await executor.runSelect(
|
||||
|
||||
Reference in New Issue
Block a user