don't play target tokens on practice activity init if it's a hidden word activity (#1121)
This commit is contained in:
parent
78cb3afe0b
commit
ceea63b3a2
2 changed files with 6 additions and 1 deletions
|
|
@ -222,6 +222,10 @@ class PracticeActivityModel {
|
|||
|
||||
String get question => content.question;
|
||||
|
||||
bool get shouldPlayTargetTokens =>
|
||||
targetTokens != null &&
|
||||
activityType != ActivityTypeEnum.hiddenWordListening;
|
||||
|
||||
factory PracticeActivityModel.fromJson(Map<String, dynamic> json) {
|
||||
// moving from multiple_choice to content as the key
|
||||
// this is to make the model more generic
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ class MultipleChoiceActivityState extends State<MultipleChoiceActivity> {
|
|||
}
|
||||
|
||||
void speakTargetTokens() {
|
||||
if (widget.practiceCardController.currentActivity?.targetTokens != null) {
|
||||
if (widget.practiceCardController.currentActivity?.shouldPlayTargetTokens ??
|
||||
false) {
|
||||
widget.practiceCardController.tts.tryToSpeak(
|
||||
PangeaToken.reconstructText(
|
||||
widget.practiceCardController.currentActivity!.targetTokens!,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue