Minor - format code

pull/3173/head
Julio Montoya 7 years ago
parent 0f695892f1
commit 5979f12a83
  1. 22
      main/exercise/exercise.php

@ -978,7 +978,7 @@ if (!empty($exerciseList)) {
// Check if this exercise was added in a LP // Check if this exercise was added in a LP
if ($exercise->exercise_was_added_in_lp == true) { if ($exercise->exercise_was_added_in_lp == true) {
$visiblity = Display::return_icon( $visibility = Display::return_icon(
'invisible.png', 'invisible.png',
get_lang('AddedToLPCannotBeAccessed'), get_lang('AddedToLPCannotBeAccessed'),
'', '',
@ -986,7 +986,7 @@ if (!empty($exerciseList)) {
); );
} else { } else {
if ($row['active'] == 0 || $visibility == 0) { if ($row['active'] == 0 || $visibility == 0) {
$visiblity = Display::url( $visibility = Display::url(
Display::return_icon( Display::return_icon(
'invisible.png', 'invisible.png',
get_lang('Activate'), get_lang('Activate'),
@ -997,7 +997,7 @@ if (!empty($exerciseList)) {
); );
} else { } else {
// else if not active // else if not active
$visiblity = Display::url( $visibility = Display::url(
Display::return_icon( Display::return_icon(
'visible.png', 'visible.png',
get_lang('Deactivate'), get_lang('Deactivate'),
@ -1010,10 +1010,10 @@ if (!empty($exerciseList)) {
} }
if ($limitTeacherAccess && !api_is_platform_admin()) { if ($limitTeacherAccess && !api_is_platform_admin()) {
$visiblity = ''; $visibility = '';
} }
$actions .= $visiblity; $actions .= $visibility;
$actions .= '<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. $actions .= '<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'.
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>';
@ -1144,7 +1144,7 @@ if (!empty($exerciseList)) {
if ($time_limits) { if ($time_limits) {
// Exam is ready to be taken // Exam is ready to be taken
if ($is_actived_time) { if ($is_actived_time) {
// Show results 697 $attempt_text = get_lang('LatestAttempt').' : '; // Show results
if ( if (
in_array( in_array(
$my_result_disabled, $my_result_disabled,
@ -1155,21 +1155,23 @@ if (!empty($exerciseList)) {
] ]
) )
) { ) {
//More than one attempt // More than one attempt
if ($num > 0) { if ($num > 0) {
$row_track = Database :: fetch_array($qryres); $row_track = Database :: fetch_array($qryres);
$attempt_text = get_lang('LatestAttempt').' : '; $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 { } else {
//No attempts //No attempts
$attempt_text = get_lang('NotAttempted'); $attempt_text = get_lang('NotAttempted');
} }
} else { } else {
//$attempt_text = get_lang('CantShowResults');
$attempt_text = '-'; $attempt_text = '-';
} }
} else { } 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 //@todo use the is_visible function
if (!empty($row['start_time']) && !empty($row['end_time'])) { if (!empty($row['start_time']) && !empty($row['end_time'])) {
$today = time(); $today = time();

Loading…
Cancel
Save