Fix exercise_show see BT#11877

Fixes $showTotalScoreAndUserChoicesInLastAttempt exercise type
1.10.x
jmontoyaa 9 years ago
parent b5e49ac44f
commit 27bee3699f
  1. 8
      main/inc/lib/exercise.lib.php

@ -3513,7 +3513,7 @@ HOTSPOT;
$show_only_score = false;
}
$show_total_score_and_user_choices = false;
$showTotalScoreAndUserChoicesInLastAttempt = true;
if ($objExercise->results_disabled == RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT) {
$show_only_score = true;
@ -3541,9 +3541,9 @@ HOTSPOT;
if ($numberAttempts >= $objExercise->attempts) {
$show_results = true;
$show_only_score = false;
$show_total_score_and_user_choices = false;
$showTotalScoreAndUserChoicesInLastAttempt = true;
} else {
$show_total_score_and_user_choices = true;
$showTotalScoreAndUserChoicesInLastAttempt = false;
}
}
}
@ -3595,7 +3595,7 @@ HOTSPOT;
$show_results,
$objExercise->selectPropagateNeg(),
[],
$show_total_score_and_user_choices
$showTotalScoreAndUserChoicesInLastAttempt
);
if (empty($result)) {

Loading…
Cancel
Save