Fixing header order

1.9.x
Julio Montoya 11 years ago
parent 48688c97ee
commit 2812d60105
  1. 20
      main/gradebook/lib/fe/flatviewtable.class.php

@ -577,21 +577,19 @@ class FlatViewTable extends SortableTable
$table_data = array();
foreach ($data_array as $user_row) {
$table_row = array();
$count = 0;
$user_id = $user_row[$count++];
$user_id = $user_row[0];
unset($user_row[0]);
$userInfo = api_get_user_info($user_id);
if ($is_western_name_order) {
$table_row[] = $this->build_name_link($user_id, $userInfo['firstname']);
$table_row[] = $this->build_name_link($user_id, $userInfo['lastname']);
$user_row[1] = $this->build_name_link($user_id, $userInfo['firstname']);
$user_row[2] = $this->build_name_link($user_id, $userInfo['lastname']);
} else {
$table_row[] = $this->build_name_link($user_id, $userInfo['lastname']);
$table_row[] = $this->build_name_link($user_id, $userInfo['firstname']);
$user_row[1] = $this->build_name_link($user_id, $userInfo['lastname']);
$user_row[2] = $this->build_name_link($user_id, $userInfo['firstname']);
}
while ($count < count($user_row)) {
$table_row[] = $user_row[$count++];
}
$table_data[] = $table_row;
$user_row = array_values($user_row);
$table_data[] = $user_row;
}
return $table_data;
}

Loading…
Cancel
Save