diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php index 0ac4010a75..da8df526cc 100755 --- a/main/exercice/exercice.php +++ b/main/exercice/exercice.php @@ -1109,7 +1109,7 @@ if ($show == 'test') { // if tracking is enabled if ($_configuration['tracking_enabled'] && ($show == 'result')) { ?> -
| ' . $user . ' | '; + //echo '' . $user . ' | '; } - echo '' . $test . ' | '; - echo ''; + //echo ' | ' . $test . ' | '; + //echo ''; if ($results[$i][7] > 1) { - echo ceil((($results[$i][4] - $results[$i][7]) / 60)) . ' ' . get_lang('MinMinutes'); + //echo ceil((($results[$i][4] - $results[$i][7]) / 60)) . ' ' . get_lang('MinMinutes'); + $duration_list = ceil((($results[$i][4] - $results[$i][7]) / 60)) . ' ' . get_lang('MinMinutes'); if ($results[$i][8] > 1) { - echo ' ( ' . $results[$i][8] . ' ' . get_lang('Steps') . ' )'; + //echo ' ( ' . $results[$i][8] . ' ' . get_lang('Steps') . ' )'; + $duration_list = ' ( ' . $results[$i][8] . ' ' . get_lang('Steps') . ' )'; } $add_start_date = format_locale_date('%b %d, %Y %H:%M', $results[$i][7]) . ' / '; } else { - echo get_lang('NoLogOfDuration'); + $duration_list = get_lang('NoLogOfDuration'); + //echo get_lang('NoLogOfDuration'); } - echo ' | '; - echo '' . $add_start_date . format_locale_date('%b %d, %Y %H:%M', $results[$i][4]) . ' | '; //get_lang('dateTimeFormatLong') - + //echo ''; + //echo '' . $add_start_date . format_locale_date('%b %d, %Y %H:%M', $results[$i][4]) . ' | '; //get_lang('dateTimeFormatLong') + $date_list = $add_start_date . format_locale_date('%b %d, %Y %H:%M', $results[$i][4]); // there are already a duration test period calculated?? //echo ''.sprintf(get_lang('DurationFormat'), $duration).' | '; @@ -1259,8 +1269,8 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) { $my_res = float_format($results[$i][2],1); $my_total = float_format($results[$i][3],1); - echo '' . round(($my_res / ($my_total != 0 ? $my_total : 1)) * 100, 2) . '% (' . $my_res . ' / ' . $my_total . ') | '; - + //echo '' . round(($my_res / ($my_total != 0 ? $my_total : 1)) * 100, 2) . '% (' . $my_res . ' / ' . $my_total . ') | '; + $result_list = round(($my_res / ($my_total != 0 ? $my_total : 1)) * 100, 2) . '% (' . $my_res . ' / ' . $my_total . ')'; // Is hard to read this!! /* echo ''.(($is_allowedToEdit||$is_tutor)? @@ -1271,34 +1281,78 @@ if ($_configuration['tracking_enabled'] && ($show == 'result')) { :(($revised)?"".get_lang('Show')."":'')).' | '; */ - echo ''; + //echo ' | '; + $html_link = ''; if ($is_allowedToEdit || $is_tutor) { if ($revised) { - echo "".Display :: return_icon('edit.gif', get_lang('Edit')); - echo ' '; + //echo "".Display :: return_icon('edit.gif', get_lang('Edit')); + //echo ' '; + $html_link.= "".Display :: return_icon('edit.gif', get_lang('Edit')); + $html_link.= ' '; + } else { + //echo "".Display :: return_icon('quizz_small.gif', get_lang('Qualify')); + //echo ' '; + $html_link.="".Display :: return_icon('quizz_small.gif', get_lang('Qualify')); + $html_link.=' '; + } + //echo ""; + $html_link.=""; + if (api_is_platform_admin() || $is_tutor) { + //echo ' '.Display :: return_icon('delete.gif', get_lang('Delete')).''; + //echo ' '; + $html_link.=' '.Display :: return_icon('delete.gif', get_lang('Delete')).''; + $html_link.=' '; + } + if ($is_allowedToEdit) { + //echo ' ' .Display :: return_icon('history.gif', get_lang('ViewHistoryChange')).''; + $html_link.=' ' .Display :: return_icon('history.gif', get_lang('ViewHistoryChange')).''; + } + } else { + if ($revised) { + //echo "" . get_lang('Show') . " "; + $html_link.="" . get_lang('Show') . " "; + } else { - echo "".Display :: return_icon('quizz_small.gif', get_lang('Qualify')); - echo ' '; + // echo ' ' . get_lang('NoResult'); + $html_link.=' ' . get_lang('NoResult'); } - echo ""; - if (api_is_platform_admin() || $is_tutor) - echo ' '.Display :: return_icon('delete.gif', get_lang('Delete')).''; - echo ' '; - if ($is_allowedToEdit) - echo ' ' .Display :: return_icon('history.gif', get_lang('ViewHistoryChange')).''; + } + $more_details_list = $html_link; + if ($is_allowedToEdit || $is_tutor) { + $list_info [] = array($user_list_name,$quiz_name_list,$duration_list,$date_list,$result_list,$more_details_list); } else { - if ($revised) - echo "" . get_lang('Show') . " "; - else - echo ' ' . get_lang('NoResult'); + $list_info [] = array($quiz_name_list,$duration_list,$date_list,$result_list,$more_details_list); } - echo ' | '; + //$list_info [] = array($user_list_name,$quiz_name_list,$duration_list,$date_list,$result_list,$more_details_list); + //echo ''; - echo '