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. 8
      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,6 +3531,10 @@ HOTSPOT;
if ($attempts) { if ($attempts) {
$numberAttempts = count($attempts); $numberAttempts = count($attempts);
} else {
$numberAttempts = 0;
}
if ($save_user_result) { if ($save_user_result) {
$numberAttempts++; $numberAttempts++;
} }
@ -3544,7 +3547,6 @@ HOTSPOT;
} }
} }
} }
}
if ($show_results || $show_only_score) { if ($show_results || $show_only_score) {
$user_info = api_get_user_info($exercise_stat_info['exe_user_id']); $user_info = api_get_user_info($exercise_stat_info['exe_user_id']);

Loading…
Cancel
Save