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:
parent
43d190b682
commit
0583409b09
1 changed files with 4 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue