fix: don't include error span as choice in grammar error practice if the translation contains the error span (#5474)

This commit is contained in:
ggurdin 2026-01-27 16:50:34 -05:00 committed by GitHub
parent 43d190b682
commit 0583409b09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,10 @@ class GrammarErrorPracticeGenerator {
.take(igcMatch.length)
.toString();
choices.add(errorSpan);
if (!req.grammarErrorInfo!.translation.contains(errorSpan)) {
choices.add(errorSpan);
}
choices.shuffle();
return MessageActivityResponse(
activity: GrammarErrorPracticeActivityModel(