Skip to content

Commit c7dc81a

Browse files
committed
Fix option RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT BT#11202
1 parent 397c9dc commit c7dc81a

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

main/inc/lib/exercise.lib.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3461,8 +3461,7 @@ public static function display_question_list_by_attempt(
34613461
$objExercise,
34623462
$exe_id,
34633463
$save_user_result = false
3464-
)
3465-
{
3464+
) {
34663465
global $origin;
34673466

34683467
// Getting attempt info
@@ -3532,16 +3531,19 @@ public static function display_question_list_by_attempt(
35323531

35333532
if ($attempts) {
35343533
$numberAttempts = count($attempts);
3535-
if ($save_user_result) {
3536-
$numberAttempts++;
3537-
}
3538-
if ($numberAttempts >= $objExercise->attempts) {
3539-
$show_results = true;
3540-
$show_only_score = false;
3541-
$show_total_score_and_user_choices = false;
3542-
} else {
3543-
$show_total_score_and_user_choices = true;
3544-
}
3534+
} else {
3535+
$numberAttempts = 0;
3536+
}
3537+
3538+
if ($save_user_result) {
3539+
$numberAttempts++;
3540+
}
3541+
if ($numberAttempts >= $objExercise->attempts) {
3542+
$show_results = true;
3543+
$show_only_score = false;
3544+
$show_total_score_and_user_choices = false;
3545+
} else {
3546+
$show_total_score_and_user_choices = true;
35453547
}
35463548
}
35473549
}

0 commit comments

Comments
 (0)