feat: 完善听力口语辅助状态记录、练习分块与复习抽查间隔机制

This commit is contained in:
shen
2026-09-23 18:33:22 -07:00
parent 6b42b7abc3
commit d740a9e19c
106 changed files with 2933 additions and 845 deletions
@@ -22,7 +22,9 @@ class AssessmentTask {
skill: AssessmentSkill.values.byName(json['skill'] as String),
prompt: json['prompt'] as String? ?? '',
audio: json['audio'] as String?,
choices: [for (final choice in json['choices'] as List? ?? const []) '$choice'],
choices: [
for (final choice in json['choices'] as List? ?? const []) '$choice',
],
answerIndex: json['answerIndex'] as int?,
accept: [
for (final group in json['accept'] as List? ?? const [])
@@ -102,10 +104,7 @@ AssessmentPack? replacementFor(String packId) =>
/// The pack whose results [packId] counts toward: the original of a
/// replacement pack, otherwise [packId] itself.
String canonicalAssessmentPackId(String packId) =>
assessmentPacks
.where((pack) => pack.id == packId)
.firstOrNull
?.replaces ??
assessmentPacks.where((pack) => pack.id == packId).firstOrNull?.replaces ??
packId;
/// Local check of an open task with the same rule engine as the lessons: it