From fef5120a2f24620fb7607f3f16d1707c23dde2f7 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 22 Mar 2022 18:35:02 -0500 Subject: [PATCH] Exercise: Fix destinations with feedback direct - refs BT#19795 --- main/exercise/exercise_submit_modal.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main/exercise/exercise_submit_modal.php b/main/exercise/exercise_submit_modal.php index 2d5c901805..34064c0622 100755 --- a/main/exercise/exercise_submit_modal.php +++ b/main/exercise/exercise_submit_modal.php @@ -62,7 +62,7 @@ if ($tryAgain) { } $loaded = isset($_GET['loaded']); -if ($allowTryAgain) { +if ($allowTryAgain || $feedbackType == EXERCISE_FEEDBACK_TYPE_DIRECT) { unset($exerciseResult[$questionId]); } @@ -409,8 +409,10 @@ if (!empty($url) && $url != -1) { ).''.get_lang('VisitUrl').'

'; } -$nextQuestion = $questionNum + 1; -$destinationId = $questionList[$nextQuestion] ?? -1; +if (null === $destinationId) { + $nextQuestion = $questionNum + 1; + $destinationId = $questionList[$nextQuestion] ?? -1; +} // the link to finish the test if (-1 == $destinationId) {