From 90998eadf81d756bcb900dca9f1e59cdeeb5bd19 Mon Sep 17 00:00:00 2001 From: Alex Kanunnikov Date: Thu, 11 Jan 2024 21:01:56 +0300 Subject: [PATCH] expose-correct-answer-for-testingg --- .../task-player/single-simple-words/component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/app/components/task-player/single-simple-words/component.ts b/frontend/app/components/task-player/single-simple-words/component.ts index 7f5da2900..aba9195cb 100644 --- a/frontend/app/components/task-player/single-simple-words/component.ts +++ b/frontend/app/components/task-player/single-simple-words/component.ts @@ -12,6 +12,13 @@ import AnswerOption from 'brn/utils/answer-option'; import SingleSimpleWordTask from 'brn/models/task/single-simple-words'; export default class SingleSimpleWordsComponent extends Component { @tracked currentAnswer: string[] = []; + willDestroy(): void { + super.willDestroy(); + if (this.audio.isPlaying) { + this.audio.stop(); + } + document.body.dataset.correctAnswer = ''; + } get audioFileUrl() { const task = this.firstUncompletedTask; if (!task) { @@ -21,6 +28,7 @@ export default class SingleSimpleWordsComponent extends Component