mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-70786 report_competency: respect fullname setting.
This commit is contained in:
parent
dddc4cc410
commit
a6e2d950e7
3 changed files with 17 additions and 9 deletions
|
@ -110,12 +110,11 @@ class user_course_navigation implements renderable, templatable {
|
|||
|
||||
$data->users = array();
|
||||
foreach ($users as $user) {
|
||||
$exporter = new user_summary_exporter($user);
|
||||
$user = $exporter->export($output);
|
||||
if ($user->id == $this->userid) {
|
||||
$user->selected = true;
|
||||
}
|
||||
$data->users[] = $user;
|
||||
$data->users[] = (object)[
|
||||
'id' => $user->id,
|
||||
'fullname' => fullname($user, has_capability('moodle/site:viewfullnames', $context)),
|
||||
'selected' => $user->id == $this->userid
|
||||
];
|
||||
}
|
||||
$data->hasusers = true;
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ if ($currentuser > 0) {
|
|||
$user = core_user::get_user($currentuser);
|
||||
$usercontext = context_user::instance($currentuser);
|
||||
$userheading = array(
|
||||
'heading' => fullname($user),
|
||||
'heading' => fullname($user, has_capability('moodle/site:viewfullnames', $context)),
|
||||
'user' => $user,
|
||||
'usercontext' => $usercontext
|
||||
);
|
||||
|
|
|
@ -16,14 +16,19 @@ Feature: See the competencies for an activity
|
|||
| shortname | fullname |
|
||||
| C1 | Course 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| username | firstname | lastname | email | idnumber | middlename | alternatename | firstnamephonetic | lastnamephonetic |
|
||||
| student1 | Grainne | Beauchamp | student1@example.com | s1 | Ann | Jill | Gronya | Beecham |
|
||||
| student2 | Niamh | Cholmondely | student2@example.com | s2 | Jane | Nina | Nee | Chumlee |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| page | PageName1 | PageDesc1 | C1 | PAGE1 |
|
||||
And the following config values are set as admin:
|
||||
| fullnamedisplay | firstname |
|
||||
| alternativefullnameformat | middlename, alternatename, firstname, lastname |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
|
@ -49,6 +54,10 @@ Feature: See the competencies for an activity
|
|||
And I set the field "Filter competencies by resource or activity" to "PageName1"
|
||||
Then I should see "Test-Comp1"
|
||||
And I should not see "Test-Comp2"
|
||||
And I should see "Ann, Jill, Grainne, Beauchamp"
|
||||
And I should see "Ann, Jill, Grainne, Beauchamp" in the ".form-autocomplete-selection" "css_element"
|
||||
And I open the autocomplete suggestions list
|
||||
And I should see "Jane, Nina, Niamh, Cholmondely" in the ".form-autocomplete-suggestions" "css_element"
|
||||
And I click on "Not rated" "link"
|
||||
And I click on "Rate" "button"
|
||||
And I set the field "Rating" to "A"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue