mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
"MDL-15251, see tracker, merged from MOODLE_19_STABLE"
This commit is contained in:
parent
058c7d9021
commit
910bd9e176
@ -211,19 +211,13 @@
|
||||
|
||||
echo '<table class="list">';
|
||||
|
||||
if (($user->city or $user->country) and (!isset($hiddenfields['city']) or !isset($hiddenfields['country']))) {
|
||||
$location = '';
|
||||
if ($user->city && !isset($hiddenfields['city'])) {
|
||||
$location .= $user->city;
|
||||
}
|
||||
if (! isset($hiddenfields['country']) && $user->country) {
|
||||
$countries = get_list_of_countries();
|
||||
if (!empty($countries[$user->country]) && !isset($hiddenfields['country'])) {
|
||||
if ($user->city && !isset($hiddenfields['city']) && !isset($hiddenfields['country'])) {
|
||||
$location .= ', ';
|
||||
}
|
||||
$location .= $countries[$user->country];
|
||||
}
|
||||
print_row(get_string("city").":", $location);
|
||||
print_row(get_string('country') . ':', $countries[$user->country]);
|
||||
}
|
||||
|
||||
if (! isset($hiddenfields['city']) && $user->city) {
|
||||
print_row(get_string('city') . ':', $user->city);
|
||||
}
|
||||
|
||||
if (has_capability('moodle/user:viewhiddendetails', $coursecontext)) {
|
||||
@ -524,3 +518,4 @@ function print_row($left, $right) {
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user