Skip to content

Commit

Permalink
Fixing header order
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 17, 2015
1 parent 48688c9 commit 2812d60
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions main/gradebook/lib/fe/flatviewtable.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,21 +577,19 @@ public function get_table_data($from = 1, $per_page = null, $column = null, $dir

$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;
}
Expand Down

0 comments on commit 2812d60

Please sign in to comment.