mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-32350-master' of https://github.com/lucaboesch/moodle
This commit is contained in:
commit
b908c1add2
@ -256,11 +256,17 @@
|
||||
$users[$key]->country = $countries[$user->country];
|
||||
}
|
||||
}
|
||||
if ($sort == "country") { // Need to resort by full country name, not code
|
||||
if ($sort == "country") {
|
||||
// Need to resort by full country name, not code.
|
||||
foreach ($users as $user) {
|
||||
$susers[$user->id] = $user->country;
|
||||
}
|
||||
asort($susers);
|
||||
// Sort by country name, according to $dir.
|
||||
if ($dir === 'DESC') {
|
||||
arsort($susers);
|
||||
} else {
|
||||
asort($susers);
|
||||
}
|
||||
foreach ($susers as $key => $value) {
|
||||
$nusers[] = $users[$key];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user