MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida)

This commit is contained in:
scyrma 2008-07-10 03:34:50 +00:00
parent 37d795053c
commit 90ffb070d0

View file

@ -304,7 +304,17 @@
$mainadmin = get_admin();
$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$override->firstname = 'firstname';
$override->lastname = 'lastname';
$fullnamelanguage = get_string('fullnamedisplay', '', $override);
if (($CFG->fullnamedisplay == 'firstname lastname') or
($CFG->fullnamedisplay == 'firstname') or
($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'firstname lastname' )) {
$fullnamedisplay = "$firstname / $lastname";
} else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
$fullnamedisplay = "$lastname / $firstname";
}
$table->head = array ($fullnamedisplay, $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
foreach ($users as $user) {