Merge pull request #4214 from AngelFQC/BT19795

Exercise: Fix destinations with feedback direct - refs BT#19795
pull/4238/head
Nicolas Ducoulombier 3 years ago committed by GitHub
commit 3e5ef89430
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      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) {
).'<a target="_blank" href="'.$url.'">'.get_lang('VisitUrl').'</a><br /><br />';
}
$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) {

Loading…
Cancel
Save