From cd79d4f12ddbcb576b4c05208bbccd1b4871ed0b Mon Sep 17 00:00:00 2001 From: Christian Beeznest Date: Thu, 27 Nov 2025 21:00:45 -0500 Subject: [PATCH] Exercise: Show only latest audio feedback player - refs BT#23108 --- public/main/inc/lib/exercise.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/main/inc/lib/exercise.lib.php b/public/main/inc/lib/exercise.lib.php index c0651077a8a..86ef6f031bd 100644 --- a/public/main/inc/lib/exercise.lib.php +++ b/public/main/inc/lib/exercise.lib.php @@ -5606,12 +5606,12 @@ public static function getOralFeedbackAudio(int $attemptId, int $questionId): st return ''; } - $html = ''; - $assetRepo = Container::getAssetRepository(); + $html = ''; + // Keep only the latest audio feedback to avoid duplicated players foreach ($qAttempt->getAttemptFeedbacks() as $attemptFeedback) { - $html .= Display::tag( + $html = Display::tag( 'audio', '', [