From 5979f12a833d3f32a98d19ab89f43336057b96ef Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 11 Apr 2019 14:01:10 +0200 Subject: [PATCH] Minor - format code --- main/exercise/exercise.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/main/exercise/exercise.php b/main/exercise/exercise.php index 3ce6fe238d..768ac2de4c 100644 --- a/main/exercise/exercise.php +++ b/main/exercise/exercise.php @@ -978,7 +978,7 @@ if (!empty($exerciseList)) { // Check if this exercise was added in a LP if ($exercise->exercise_was_added_in_lp == true) { - $visiblity = Display::return_icon( + $visibility = Display::return_icon( 'invisible.png', get_lang('AddedToLPCannotBeAccessed'), '', @@ -986,7 +986,7 @@ if (!empty($exerciseList)) { ); } else { if ($row['active'] == 0 || $visibility == 0) { - $visiblity = Display::url( + $visibility = Display::url( Display::return_icon( 'invisible.png', get_lang('Activate'), @@ -997,7 +997,7 @@ if (!empty($exerciseList)) { ); } else { // else if not active - $visiblity = Display::url( + $visibility = Display::url( Display::return_icon( 'visible.png', get_lang('Deactivate'), @@ -1010,10 +1010,10 @@ if (!empty($exerciseList)) { } if ($limitTeacherAccess && !api_is_platform_admin()) { - $visiblity = ''; + $visibility = ''; } - $actions .= $visiblity; + $actions .= $visibility; $actions .= ''. Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).''; @@ -1144,7 +1144,7 @@ if (!empty($exerciseList)) { if ($time_limits) { // Exam is ready to be taken if ($is_actived_time) { - // Show results 697 $attempt_text = get_lang('LatestAttempt').' : '; + // Show results if ( in_array( $my_result_disabled, @@ -1155,21 +1155,23 @@ if (!empty($exerciseList)) { ] ) ) { - //More than one attempt + // More than one attempt if ($num > 0) { $row_track = Database :: fetch_array($qryres); $attempt_text = get_lang('LatestAttempt').' : '; - $attempt_text .= ExerciseLib::show_score($row_track['exe_result'], $row_track['exe_weighting']); + $attempt_text .= ExerciseLib::show_score( + $row_track['exe_result'], + $row_track['exe_weighting'] + ); } else { //No attempts $attempt_text = get_lang('NotAttempted'); } } else { - //$attempt_text = get_lang('CantShowResults'); $attempt_text = '-'; } } else { - //Quiz not ready due to time limits 700 $attempt_text = get_lang('NotAttempted'); + // Quiz not ready due to time limits //@todo use the is_visible function if (!empty($row['start_time']) && !empty($row['end_time'])) { $today = time();