mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-68334 user: Display name in footer as elsewhere.
This commit is contained in:
parent
a7d9b53e72
commit
4994817908
@ -1053,7 +1053,7 @@ class core_renderer extends renderer_base {
|
||||
$course = $this->page->course;
|
||||
if (\core\session\manager::is_loggedinas()) {
|
||||
$realuser = \core\session\manager::get_realuser();
|
||||
$fullname = fullname($realuser, true);
|
||||
$fullname = fullname($realuser);
|
||||
if ($withlinks) {
|
||||
$loginastitle = get_string('loginas');
|
||||
$realuserinfo = " [<a href=\"$CFG->wwwroot/course/loginas.php?id=$course->id&sesskey=".sesskey()."\"";
|
||||
@ -1074,7 +1074,7 @@ class core_renderer extends renderer_base {
|
||||
} else if (isloggedin()) {
|
||||
$context = context_course::instance($course->id);
|
||||
|
||||
$fullname = fullname($USER, true);
|
||||
$fullname = fullname($USER);
|
||||
// Since Moodle 2.0 this link always goes to the public profile page (not the course profile page)
|
||||
if ($withlinks) {
|
||||
$linktitle = get_string('viewprofile');
|
||||
|
@ -53,6 +53,7 @@ Feature: Users' names are displayed across the site according to the user policy
|
||||
When I follow "Profile" in the user menu
|
||||
Then I should see "Gronya,Beecham" in the ".usermenu" "css_element"
|
||||
And I should see "Gronya,Beecham" in the ".page-context-header" "css_element"
|
||||
And I should see "You are logged in as Gronya,Beecham" in the "page-footer" "region"
|
||||
And I log out
|
||||
|
||||
Scenario: As an admin, 'fullnamedisplay' should be used when using the 'log in as' function
|
||||
@ -60,7 +61,9 @@ Feature: Users' names are displayed across the site according to the user policy
|
||||
When I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "Jane, Nina, Niamh, Cholmondely"
|
||||
And I follow "Log in as"
|
||||
Then I should see "You are logged in as Nee,Chumlee"
|
||||
Then I should see "You are logged in as Nee,Chumlee" in the ".usermenu" "css_element"
|
||||
And I should see "You are logged in as Jane, Nina, Niamh, Cholmondely" in the "region-main" "region"
|
||||
And I should see "You are logged in as Nee,Chumlee" in the "page-footer" "region"
|
||||
And I log out
|
||||
|
||||
Scenario: As an admin, 'fullnamedisplay' should be used when viewing another user's site profile
|
||||
|
Loading…
x
Reference in New Issue
Block a user