diff --git a/main/gradebook/lib/flatview_data_generator.class.php b/main/gradebook/lib/flatview_data_generator.class.php index 40ae9686d2..2e1553cee3 100755 --- a/main/gradebook/lib/flatview_data_generator.class.php +++ b/main/gradebook/lib/flatview_data_generator.class.php @@ -314,10 +314,10 @@ class FlatViewDataGenerator // Sort functions - used internally function sort_by_last_name($item1, $item2) { - return api_strcmp($item1[1], $item2[1]); + return api_strcmp($item1[2], $item2[2]); } function sort_by_first_name($item1, $item2) { - return api_strcmp($item1[2], $item2[2]); + return api_strcmp($item1[3], $item2[3]); } }