Fix option RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT BT#11202

pull/2487/head
jmontoyaa 10 years ago
parent 397c9dcfd1
commit c7dc81a679
  1. 26
      main/inc/lib/exercise.lib.php

@ -3461,8 +3461,7 @@ HOTSPOT;
$objExercise, $objExercise,
$exe_id, $exe_id,
$save_user_result = false $save_user_result = false
) ) {
{
global $origin; global $origin;
// Getting attempt info // Getting attempt info
@ -3532,16 +3531,19 @@ HOTSPOT;
if ($attempts) { if ($attempts) {
$numberAttempts = count($attempts); $numberAttempts = count($attempts);
if ($save_user_result) { } else {
$numberAttempts++; $numberAttempts = 0;
} }
if ($numberAttempts >= $objExercise->attempts) {
$show_results = true; if ($save_user_result) {
$show_only_score = false; $numberAttempts++;
$show_total_score_and_user_choices = false; }
} else { if ($numberAttempts >= $objExercise->attempts) {
$show_total_score_and_user_choices = true; $show_results = true;
} $show_only_score = false;
$show_total_score_and_user_choices = false;
} else {
$show_total_score_and_user_choices = true;
} }
} }
} }

Loading…
Cancel
Save