From 6681e0b29b54a27d2a36eaefd165755346db39c9 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Fri, 16 Aug 2019 10:21:44 +0200 Subject: [PATCH] Minor - format code --- main/exercise/overview.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main/exercise/overview.php b/main/exercise/overview.php index 0636459008..45acaf451f 100755 --- a/main/exercise/overview.php +++ b/main/exercise/overview.php @@ -388,10 +388,11 @@ if (!empty($attempts)) { $table_content = $table->toHtml(); } -if ($objExercise->selectAttempts()) { - $attempt_message = get_lang('Attempts').' '.$counter.' / '.$objExercise->selectAttempts(); +$selectAttempts = $objExercise->selectAttempts(); +if ($selectAttempts) { + $attempt_message = get_lang('Attempts').' '.$counter.' / '.$selectAttempts; - if ($counter == $objExercise->selectAttempts()) { + if ($counter == $selectAttempts) { $attempt_message = Display::return_message($attempt_message, 'error'); } else { $attempt_message = Display::return_message($attempt_message, 'info');