瀏覽代碼

Minor - format code

Julio Montoya 5 年之前
父節點
當前提交
6681e0b29b
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      main/exercise/overview.php

+ 4 - 3
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');