mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-49845 profile: changed 'My preferences' display logic
This commit is contained in:
parent
c1f97c777f
commit
7193ea2cd2
@ -23,3 +23,4 @@ mypreferences,core_grades
|
||||
myprofile,core
|
||||
myprofilemyblogs,core_blog
|
||||
viewallmyentries,core_blog
|
||||
userspreferences,core_moodle
|
||||
|
@ -1934,7 +1934,6 @@ $string['usernameoremail'] = 'Enter either username or email address';
|
||||
$string['usernotconfirmed'] = 'Could not confirm {$a}';
|
||||
$string['userpic'] = 'User picture';
|
||||
$string['users'] = 'Users';
|
||||
$string['userspreferences'] = 'User {$a}\'s preferences';
|
||||
$string['userselectorautoselectunique'] = 'If only one user matches the search, select them automatically';
|
||||
$string['userselectorpreserveselected'] = 'Keep selected users, even if they no longer match the search';
|
||||
$string['userselectorsearchanywhere'] = 'Match the search text anywhere in the displayed fields';
|
||||
@ -2042,3 +2041,5 @@ $string['yourself'] = 'yourself';
|
||||
$string['yourteacher'] = 'your {$a}';
|
||||
$string['yourwordforx'] = 'Your word for \'{$a}\'';
|
||||
$string['zippingbackup'] = 'Zipping backup';
|
||||
// Deprecated since Moodle 2.9
|
||||
$string['userspreferences'] = 'User {$a}\'s preferences';
|
||||
|
@ -100,9 +100,9 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user,
|
||||
}
|
||||
|
||||
// Preference page. Only visible by administrators.
|
||||
if (is_siteadmin()) {
|
||||
if (!$iscurrentuser && is_siteadmin()) {
|
||||
$url = new moodle_url('/user/preferences.php', array('userid' => $user->id));
|
||||
$title = $iscurrentuser ? get_string('preferences') : get_string('userspreferences', 'moodle', fullname($user));
|
||||
$title = get_string('preferences', 'moodle');
|
||||
$node = new core_user\output\myprofile\node('administration', 'preferences', $title, null, $url);
|
||||
$tree->add_node($node);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user