Removing center alignment now it depends in the CSS class data_table see #5175

skala
Julio Montoya 13 years ago
parent fb4065008e
commit 5568f1b8e8
  1. 128
      main/mySpace/admin.php
  2. 11
      main/mySpace/coaches.php
  3. 6
      main/mySpace/course.php
  4. 2
      main/mySpace/current_courses.php
  5. 24
      main/mySpace/index.php
  6. 39
      main/mySpace/myStudents.php
  7. 2
      main/mySpace/progression.php
  8. 12
      main/mySpace/reussite.php
  9. 2
      main/mySpace/session.php
  10. 16
      main/mySpace/student.php
  11. 2
      main/mySpace/teachers.php

@ -1,4 +1,5 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/* /*
* Created on 18 October 2006 by Elixir Interactive http://www.elixir-interactive.com * Created on 18 October 2006 by Elixir Interactive http://www.elixir-interactive.com
@ -7,119 +8,112 @@
ob_start(); ob_start();
// name of the language file that needs to be included // name of the language file that needs to be included
$language_file = array ('registration', 'index', 'trad4all', 'tracking'); $language_file = array('registration', 'index', 'trad4all', 'tracking');
$cidReset = true; $cidReset = true;
require '../inc/global.inc.php'; require '../inc/global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php'; require_once api_get_path(SYS_CODE_PATH) . 'mySpace/myspace.lib.php';
$this_section = SECTION_TRACKING; $this_section = SECTION_TRACKING;
$nameTools = get_lang('Administrators'); $nameTools = get_lang('Administrators');
api_block_anonymous_users(); api_block_anonymous_users();
$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); $interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
Display :: display_header($nameTools); Display :: display_header($nameTools);
api_display_tool_title($nameTools); api_display_tool_title($nameTools);
// Database Table Definitions // Database Table Definitions
$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); $tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); $tbl_user = Database :: get_main_table(TABLE_MAIN_USER);
$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
$tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); $tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE);
$tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER); $tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER);
$tbl_admin = Database :: get_main_table(TABLE_MAIN_ADMIN); $tbl_admin = Database :: get_main_table(TABLE_MAIN_ADMIN);
/** /**
* MAIN PART * MAIN PART
*/ */
/* /*
* liste nominative avec coordonnies et lien vers les cours et les stagiaires dont il est le responsable. * liste nominative avec coordonnies et lien vers les cours et les stagiaires dont il est le responsable.
*/ */
if (isset($_POST['export'])) { if (isset($_POST['export'])) {
$order_clause = api_is_western_name_order(PERSON_NAME_DATA_EXPORT) ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; $order_clause = api_is_western_name_order(PERSON_NAME_DATA_EXPORT) ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname';
} else { } else {
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname';
} }
$sql_admins = "SELECT user.user_id,lastname,firstname,email $sql_admins = "SELECT user.user_id,lastname,firstname,email
FROM $tbl_user as user, $tbl_admin as admin FROM $tbl_user as user, $tbl_admin as admin
WHERE admin.user_id=user.user_id".$order_clause; WHERE admin.user_id=user.user_id" . $order_clause;
$result_admins = Database::query($sql_admins); $result_admins = Database::query($sql_admins);
if (api_is_western_name_order()) { if (api_is_western_name_order()) {
echo '<table class="data_table"><tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; echo '<table class="data_table"><tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>';
} else { } else {
echo '<table class="data_table"><tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; echo '<table class="data_table"><tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>';
} }
if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) {
$header[] = get_lang('FirstName', ''); $header[] = get_lang('FirstName', '');
$header[] = get_lang('LastName', ''); $header[] = get_lang('LastName', '');
} else { } else {
$header[] = get_lang('LastName', ''); $header[] = get_lang('LastName', '');
$header[] = get_lang('FirstName', ''); $header[] = get_lang('FirstName', '');
} }
$header[] = get_lang('Email', ''); $header[] = get_lang('Email', '');
if (Database::num_rows($result_admins) > 0) { if (Database::num_rows($result_admins) > 0) {
while ($admins = Database::fetch_array($result_admins)) { while ($admins = Database::fetch_array($result_admins)) {
$user_id = $admins["user_id"]; $user_id = $admins["user_id"];
$lastname = $admins["lastname"]; $lastname = $admins["lastname"];
$firstname = $admins["firstname"]; $firstname = $admins["firstname"];
$email = $admins["email"]; $email = $admins["email"];
if ($i % 2 == 0) { if ($i % 2 == 0) {
$css_class = "row_odd"; $css_class = "row_odd";
if ($i % 20 == 0 && $i != 0) { if ($i % 20 == 0 && $i != 0) {
if (api_is_western_name_order()) { if (api_is_western_name_order()) {
echo '<tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>'; echo '<tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>';
} else { } else {
echo '<tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>'; echo '<tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>';
} }
} }
} else { } else {
$css_class = "row_even"; $css_class = "row_even";
} }
$i++; $i++;
if (api_is_western_name_order()) { if (api_is_western_name_order()) {
echo "<tr class=".$css_class."><td>$firstname</td><td>$lastname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; echo "<tr class=" . $css_class . "><td>$firstname</td><td>$lastname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>";
} else { } else {
echo "<tr class=".$css_class."><td>$lastname</td><td>$firstname</td><td><a href='mailto:".$email."'>$email</a></td></tr>"; echo "<tr class=" . $css_class . "><td>$lastname</td><td>$firstname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>";
} }
if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) { if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) {
$data[$user_id]["firstname"] = $firstname; $data[$user_id]["firstname"] = $firstname;
$data[$user_id]["lastname"] = $lastname; $data[$user_id]["lastname"] = $lastname;
} else { } else {
$data[$user_id]["lastname"] = $lastname; $data[$user_id]["lastname"] = $lastname;
$data[$user_id]["firstname"] = $firstname; $data[$user_id]["firstname"] = $firstname;
} }
$data[$user_id]["email"] = $email; $data[$user_id]["email"] = $email;
} }
} else { } else {
// No results // No results
echo '<tr><td colspan="3" "align=center">'.get_lang('NoResults').'</td></tr>'; echo '<tr><td colspan="3">' . get_lang('NoResults') . '</td></tr>';
} }
echo '</table>'; echo '</table>';
if (isset($_POST['export'])) { if (isset($_POST['export'])) {
export_csv($header, $data, 'administrators.csv'); export_csv($header, $data, 'administrators.csv');
} }
echo "<br /><br />"; echo "<br /><br />";
echo "<form method='post' action='admin.php'><button type='submit' class='save' name='export' value='".get_lang('exportExcel')."'>".get_lang('exportExcel')."</button><form>"; echo "<form method='post' action='admin.php'><button type='submit' class='save' name='export' value='" . get_lang('exportExcel') . "'>" . get_lang('exportExcel') . "</button><form>";
/*
==============================================================================
FOOTER
==============================================================================
*/
Display::display_footer(); Display::display_footer();

@ -164,7 +164,7 @@ if (Database::num_rows($result_coachs) > 0) {
} }
} else { } else {
// No results // No results
echo '<tr><td colspan="5" "align=center">'.get_lang("NoResult").'</td></tr>'; echo '<tr><td colspan="5">'.get_lang("NoResult").'</td></tr>';
} }
echo '</table>'; echo '</table>';
@ -174,11 +174,4 @@ if (isset($_POST['export'])){
echo "<br /><br />"; echo "<br /><br />";
echo "<form method='post' action='coaches.php'><button type='submit' class='save' name='export' value='".get_lang('exportExcel')."'>".get_lang('exportExcel')."</button><form>"; echo "<form method='post' action='coaches.php'><button type='submit' class='save' name='export' value='".get_lang('exportExcel')."'>".get_lang('exportExcel')."</button><form>";
Display::display_footer();
/*
==============================================================================
FOOTER
==============================================================================
*/
Display::display_footer();

@ -128,7 +128,7 @@ if (!api_is_drh() && !api_is_session_admin() && !api_is_platform_admin()) {
$nb_courses = count($a_courses); $nb_courses = count($a_courses);
$table = new SortableTable('tracking_list_course', 'count_courses'); $table = new SortableTable('tracking_list_course', 'count_courses');
$table -> set_header(0, get_lang('CourseTitle'), false, 'align="center"'); $table -> set_header(0, get_lang('CourseTitle'), false);
$table -> set_header(1, get_lang('NbStudents'), false); $table -> set_header(1, get_lang('NbStudents'), false);
$table -> set_header(2, get_lang('TimeSpentInTheCourse').Display :: return_icon('info3.gif', get_lang('TimeOfActiveByTraining'), array('align' => 'absmiddle', 'hspace' => '3px')), false); $table -> set_header(2, get_lang('TimeSpentInTheCourse').Display :: return_icon('info3.gif', get_lang('TimeOfActiveByTraining'), array('align' => 'absmiddle', 'hspace' => '3px')), false);
$table -> set_header(3, get_lang('ThematicAdvance'), false); $table -> set_header(3, get_lang('ThematicAdvance'), false);
@ -230,8 +230,8 @@ if (is_array($a_courses)) {
// $csv_content = array_merge($csv_header, $csv_content); // Before this statement you are allowed to sort (in different way) the array $csv_content. // $csv_content = array_merge($csv_header, $csv_content); // Before this statement you are allowed to sort (in different way) the array $csv_content.
} }
$table -> setColAttributes(0, array('align' => 'left')); //$table -> setColAttributes(0);
$table -> setColAttributes(7, array('align' => 'center')); //$table -> setColAttributes(7);
$table -> display(); $table -> display();
Display :: display_footer(); Display :: display_footer();

@ -269,7 +269,7 @@ foreach ($array as $row_table) {
$column = 0; $column = 0;
foreach ($row_table as $cell) { foreach ($row_table as $cell) {
$table->setCellContents($row, $column, $cell); $table->setCellContents($row, $column, $cell);
$table->updateCellAttributes($row, $column, 'align="center"'); //$table->updateCellAttributes($row, $column, 'align="center"');
$column++; $column++;
} }
$table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true); $table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true);

@ -383,7 +383,7 @@ if (api_is_allowed_to_create_course() && $view == 'teacher') {
$parameters['view'] = 'teacher'; $parameters['view'] = 'teacher';
$parameters['class'] = 'data_table'; $parameters['class'] = 'data_table';
$table->set_additional_parameters($parameters); $table->set_additional_parameters($parameters);
$table -> set_header(0, get_lang('CourseTitle'), false, 'align="center"'); $table -> set_header(0, get_lang('CourseTitle'), false);
$table -> set_header(1, get_lang('NbStudents'), false); $table -> set_header(1, get_lang('NbStudents'), false);
$table -> set_header(2, get_lang('AvgTimeSpentInTheCourse').' '.Display :: return_icon('info3.gif', get_lang('TimeOfActiveByTraining'), array('align' => 'absmiddle', 'hspace' => '3px')), false); $table -> set_header(2, get_lang('AvgTimeSpentInTheCourse').' '.Display :: return_icon('info3.gif', get_lang('TimeOfActiveByTraining'), array('align' => 'absmiddle', 'hspace' => '3px')), false);
$table -> set_header(3, get_lang('AvgStudentsProgress').' '.Display :: return_icon('info3.gif', get_lang('AvgAllUsersInAllCourses'), array('align' => 'absmiddle', 'hspace' => '3px')), false); $table -> set_header(3, get_lang('AvgStudentsProgress').' '.Display :: return_icon('info3.gif', get_lang('AvgAllUsersInAllCourses'), array('align' => 'absmiddle', 'hspace' => '3px')), false);
@ -455,10 +455,6 @@ if (api_is_allowed_to_create_course() && $view == 'teacher') {
$table -> addRow($row); $table -> addRow($row);
} }
$table -> setColAttributes(1, array('align' => 'center'));
$table -> setColAttributes(2, array('align' => 'center'));
$table -> setColAttributes(3, array('align' => 'center'));
/* Start session over view stats */ /* Start session over view stats */
$nb_sessions_past = $nb_sessions_current = 0; $nb_sessions_past = $nb_sessions_current = 0;
@ -557,18 +553,18 @@ if ($is_platform_admin && $view == 'admin' && $display != 'yourstudents') {
$parameters['view'] = 'admin'; $parameters['view'] = 'admin';
$table->set_additional_parameters($parameters); $table->set_additional_parameters($parameters);
if ($is_western_name_order) { if ($is_western_name_order) {
$table -> set_header(0, get_lang('FirstName'), true, 'align="center"'); $table -> set_header(0, get_lang('FirstName'), true);
$table -> set_header(1, get_lang('LastName'), true, 'align="center"'); $table -> set_header(1, get_lang('LastName'), true);
} else { } else {
$table -> set_header(0, get_lang('LastName'), true, 'align="center"'); $table -> set_header(0, get_lang('LastName'), true);
$table -> set_header(1, get_lang('FirstName'), true, 'align="center"'); $table -> set_header(1, get_lang('FirstName'), true);
} }
$table -> set_header(2, get_lang('TimeSpentOnThePlatform'), false); $table -> set_header(2, get_lang('TimeSpentOnThePlatform'), false);
$table -> set_header(3, get_lang('LastConnexion'), false, 'align="center"'); $table -> set_header(3, get_lang('LastConnexion'), false);
$table -> set_header(4, get_lang('NbStudents'), false); $table -> set_header(4, get_lang('NbStudents'), false);
$table -> set_header(5, get_lang('CountCours'), false); $table -> set_header(5, get_lang('CountCours'), false);
$table -> set_header(6, get_lang('NumberOfSessions'), false); $table -> set_header(6, get_lang('NumberOfSessions'), false);
$table -> set_header(7, get_lang('Sessions'), false, 'align="center"'); $table -> set_header(7, get_lang('Sessions'), false);
if ($is_western_name_order) { if ($is_western_name_order) {
$csv_header[] = array ( $csv_header[] = array (
@ -667,7 +663,7 @@ if ($is_platform_admin && $view == 'admin' && $display != 'yourstudents') {
$table_row[] = $nb_students; $table_row[] = $nb_students;
$table_row[] = $nb_courses; $table_row[] = $nb_courses;
$table_row[] = $nb_sessions; $table_row[] = $nb_sessions;
$table_row[] = '<center><a href="session.php?id_coach='.$coaches['user_id'].'"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></center>'; $table_row[] = '<a href="session.php?id_coach='.$coaches['user_id'].'"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a>';
$all_datas[] = $table_row; $all_datas[] = $table_row;
if ($is_western_name_order) { if ($is_western_name_order) {
@ -711,11 +707,11 @@ if ($is_platform_admin && $view == 'admin' && $display != 'yourstudents') {
foreach ($all_datas as $row) { foreach ($all_datas as $row) {
$table -> addRow($row, 'align="right"'); $table -> addRow($row, 'align="right"');
} }
/*
$table -> updateColAttributes(0, array('align' => 'left')); $table -> updateColAttributes(0, array('align' => 'left'));
$table -> updateColAttributes(1, array('align' => 'left')); $table -> updateColAttributes(1, array('align' => 'left'));
$table -> updateColAttributes(3, array('align' => 'left')); $table -> updateColAttributes(3, array('align' => 'left'));
$table -> updateColAttributes(7, array('align' => 'center')); $table -> updateColAttributes(7, array('align' => 'center'));*/
$table -> display(); $table -> display();
} }
} }

@ -656,17 +656,17 @@ if (empty($_GET['details'])) {
); );
echo '<tr> echo '<tr>
<td align="right">'.$course_info['title'].'</td> <td >'.$course_info['title'].'</td>
<td align="right">'.$time_spent_on_course .'</td> <td >'.$time_spent_on_course .'</td>
<td align="right">'.$progress.'</td> <td >'.$progress.'</td>
<td align="right">'.$score.'</td> <td >'.$score.'</td>
<td align="right">'.$attendances_faults_avg.'</td> <td >'.$attendances_faults_avg.'</td>
<td align="right">'.$scoretotal_display.'</td>'; <td >'.$scoretotal_display.'</td>';
if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) { if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
echo '<td align="center" width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&id_coach='.Security::remove_XSS($_GET['id_coach']).'&origin='.Security::remove_XSS($_GET['origin']).'&id_session='.$session_id.'#infosStudent"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></td>'; echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&id_coach='.Security::remove_XSS($_GET['id_coach']).'&origin='.Security::remove_XSS($_GET['origin']).'&id_session='.$session_id.'#infosStudent"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></td>';
} else { } else {
echo '<td align="center" width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&origin='.Security::remove_XSS($_GET['origin']).'&id_session='.$session_id.'#infosStudent"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></td>'; echo '<td width="10"><a href="'.api_get_self().'?student='.$user_info['user_id'].'&details=true&course='.$course_info['code'].'&origin='.Security::remove_XSS($_GET['origin']).'&id_session='.$session_id.'#infosStudent"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></td>';
} }
echo '</tr>'; echo '</tr>';
} }
@ -777,21 +777,21 @@ if (empty($_GET['details'])) {
echo '<tr class="'.$css_class.'">'; echo '<tr class="'.$css_class.'">';
echo Display::tag('td', stripslashes($lp_name)); echo Display::tag('td', stripslashes($lp_name));
echo Display::tag('td', api_time_to_hms($total_time), array('align'=>'center')); echo Display::tag('td', api_time_to_hms($total_time));
if (!is_null($score)) { if (!is_null($score)) {
if (is_numeric($score)) { if (is_numeric($score)) {
$score = $score.'%'; $score = $score.'%';
} }
} }
echo Display::tag('td', $score, array('align'=>'center')); echo Display::tag('td', $score);
if (!is_null($score_latest)) { if (!is_null($score_latest)) {
if (is_numeric($score_latest)) { if (is_numeric($score_latest)) {
$score_latest = $score_latest.'%'; $score_latest = $score_latest.'%';
} }
} }
echo Display::tag('td', $score_latest, array('align'=>'center')); echo Display::tag('td', $score_latest);
if (is_numeric($progress)) { if (is_numeric($progress)) {
$progress = $progress.'%'; $progress = $progress.'%';
@ -799,11 +799,10 @@ if (empty($_GET['details'])) {
$progress = '-'; $progress = '-';
} }
echo Display::tag('td', $progress, array('align'=>'center')); echo Display::tag('td', $progress);
//Do not change with api_convert_and_format_date, because this value came from the lp_item_view table //Do not change with api_convert_and_format_date, because this value came from the lp_item_view table
//which implies several other changes not a priority right now //which implies several other changes not a priority right now
echo Display::tag('td', $start_time, array('align'=>'center')); echo Display::tag('td', $start_time);
if ($any_result === true) { if ($any_result === true) {
$from = ''; $from = '';
@ -811,11 +810,11 @@ if (empty($_GET['details'])) {
$from ='&from=myspace'; $from ='&from=myspace';
} }
$link = Display::url('<img src="../img/2rightarrow.gif" border="0" />','lp_tracking.php?course='.Security::remove_XSS($_GET['course']).$from.'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student_id='.$user_info['user_id'].'&id_session='.$session_id); $link = Display::url('<img src="../img/2rightarrow.gif" border="0" />','lp_tracking.php?course='.Security::remove_XSS($_GET['course']).$from.'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student_id='.$user_info['user_id'].'&id_session='.$session_id);
echo Display::tag('td', $link, array('align'=>'center')); echo Display::tag('td', $link);
} }
if (api_is_allowed_to_edit()) { if (api_is_allowed_to_edit()) {
echo '<td align="center">'; echo '<td>';
if ($any_result === true) { if ($any_result === true) {
echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&course='.Security::remove_XSS($_GET['course']).'&details='.Security::remove_XSS($_GET['details']).'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student='.$user_info['user_id'].'&details=true&id_session='.Security::remove_XSS($_GET['id_session']).'">'; echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&course='.Security::remove_XSS($_GET['course']).'&details='.Security::remove_XSS($_GET['details']).'&origin='.Security::remove_XSS($_GET['origin']).'&lp_id='.$learnpath['id'].'&student='.$user_info['user_id'].'&details=true&id_session='.Security::remove_XSS($_GET['id_session']).'">';
echo Display::return_icon('clean.png',get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>'; echo Display::return_icon('clean.png',get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>';
@ -878,7 +877,7 @@ if (empty($_GET['details'])) {
echo '<tr class="'.$css_class.'"><td>'.$exercices['title'].'</td>'; echo '<tr class="'.$css_class.'"><td>'.$exercices['title'].'</td>';
echo '<td align="center">'; echo '<td>';
if ($count_attempts > 0) { if ($count_attempts > 0) {
echo $score_percentage . '%'; echo $score_percentage . '%';
@ -888,8 +887,8 @@ if (empty($_GET['details'])) {
} }
echo '</td>'; echo '</td>';
echo '<td align="center">'.$count_attempts.'</td>'; echo '<td>'.$count_attempts.'</td>';
echo '<td align="center">'; echo '<td>';
$sql_last_attempt = 'SELECT exe_id FROM ' . $tbl_stats_exercices . ' $sql_last_attempt = 'SELECT exe_id FROM ' . $tbl_stats_exercices . '
WHERE exe_exo_id ="'.$exercise_id.'" AND WHERE exe_exo_id ="'.$exercise_id.'" AND
@ -908,7 +907,7 @@ if (empty($_GET['details'])) {
} }
echo '</td>'; echo '</td>';
echo '<td align="center">'; echo '<td>';
$all_attempt_url = "../exercice/exercise_report.php?exerciseId=$exercise_id&cidReq=$course_code&filter_by_user=$student_id&id_session=$session_id"; $all_attempt_url = "../exercice/exercise_report.php?exerciseId=$exercise_id&cidReq=$course_code&filter_by_user=$student_id&id_session=$session_id";
echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url ); echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url );

@ -58,7 +58,7 @@ if (Database::num_rows($result_course) > 0) {
} else { } else {
$moyenne_test = null; $moyenne_test = null;
} }
echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td align="center">'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>'; echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>';
} }
echo '</table>'; echo '</table>';
echo "<br /><br />"; echo "<br /><br />";

@ -69,7 +69,7 @@ if (!empty($_GET['session'])) {
$moyenne_test = null; $moyenne_test = null;
} }
echo '<tr><td>'.$session['name'].'</td><td align="center">'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td><td> </td></tr>'; echo '<tr><td>'.$session['name'].'</td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td><td> </td></tr>';
} }
echo '</table>'; echo '</table>';
} else { } else {
@ -102,17 +102,11 @@ if (!empty($_GET['session'])) {
} else { } else {
$moyenne_test = null; $moyenne_test = null;
} }
echo '<tr><td>'.$course['title'].'</td><td align="center">'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td><td> </td></tr>'; echo '<tr><td>'.$course['title'].'</td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td><td> </td></tr>';
} }
echo '</table>'; echo '</table>';
} else { } else {
echo get_lang('NoCourse'); echo get_lang('NoCourse');
} }
} }
/* Display :: display_footer();
==============================================================================
FOOTER
==============================================================================
*/
Display :: display_footer();

@ -156,7 +156,7 @@ if ($nb_sessions > 0) {
$table -> addRow($row); $table -> addRow($row);
} }
$table -> setColAttributes(2, array('align' => 'center')); //$table -> setColAttributes(2, array('align' => 'center'));
$table -> display(); $table -> display();
if ($export_csv) { if ($export_csv) {

@ -168,11 +168,11 @@ if (api_is_allowed_to_create_course() || api_is_drh()) {
if (count($students) > 0) { if (count($students) > 0) {
$table = new SortableTable('tracking_student', 'count_student_coached', null, ($is_western_name_order xor $sort_by_first_name) ? 1 : 0); $table = new SortableTable('tracking_student', 'count_student_coached', null, ($is_western_name_order xor $sort_by_first_name) ? 1 : 0);
if ($is_western_name_order) { if ($is_western_name_order) {
$table -> set_header(0, get_lang('FirstName'), false, 'align="center'); $table -> set_header(0, get_lang('FirstName'), false);
$table -> set_header(1, get_lang('LastName'), false, 'align="center'); $table -> set_header(1, get_lang('LastName'), false);
} else { } else {
$table -> set_header(0, get_lang('LastName'), false, 'align="center'); $table -> set_header(0, get_lang('LastName'), false);
$table -> set_header(1, get_lang('FirstName'), false, 'align="center'); $table -> set_header(1, get_lang('FirstName'), false);
} }
/* $table -> set_header(2, get_lang('Time'), false); /* $table -> set_header(2, get_lang('Time'), false);
$table -> set_header(3, get_lang('Progress'), false); $table -> set_header(3, get_lang('Progress'), false);
@ -267,8 +267,7 @@ if (api_is_allowed_to_create_course() || api_is_drh()) {
$row[] = $first_date; $row[] = $first_date;
$row[] = $string_date; $row[] = $string_date;
if ($export_csv) { if ($export_csv) {
$row[count($row) - 1] = strip_tags($row[count($row) - 1]); $row[count($row) - 1] = strip_tags($row[count($row) - 1]);
$row[count($row) - 2] = strip_tags($row[count($row) - 2]); $row[count($row) - 2] = strip_tags($row[count($row) - 2]);
$csv_content[] = $row; $csv_content[] = $row;
@ -297,11 +296,6 @@ if (api_is_allowed_to_create_course() || api_is_drh()) {
foreach ($all_datas as $row) { foreach ($all_datas as $row) {
$table -> addRow($row, 'align="right"'); $table -> addRow($row, 'align="right"');
} }
$table -> updateColAttributes(0, array('align' => 'left'));
$table -> updateColAttributes(1, array('align' => 'left'));
/* $table -> updateColAttributes(7, array('align' => 'left'));
$table -> updateColAttributes(8, array('align' => 'left'));
$table -> setColAttributes(9, array('align' => 'center'));*/
$table -> display(); $table -> display();
} else { } else {
echo Display::display_warning_message(get_lang('NoStudent')); echo Display::display_warning_message(get_lang('NoStudent'));

@ -171,7 +171,7 @@ if (count($formateurs) > 0) {
} }
} else { } else {
// No results // No results
echo '<tr><td colspan="6" "align=center">'.get_lang("NoResults").'</td></tr>'; echo '<tr><td colspan="6">'.get_lang("NoResults").'</td></tr>';
} }
echo '</table>'; echo '</table>';

Loading…
Cancel
Save