Skip to content

Commit

Permalink
MDL-76386 core_user: Add/remove users dialog improvement
Browse files Browse the repository at this point in the history
* Use language string to customise user information in the group Add/Remove dialog
  • Loading branch information
Laurent David committed Feb 20, 2023
1 parent 8503f2c commit 183d97a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/en/user.php
Expand Up @@ -139,6 +139,7 @@
$string['target:upcomingactivitiesdue'] = 'Upcoming activities due';
$string['target:upcomingactivitiesdue_help'] = 'This target generates reminders for upcoming activities due.';
$string['target:upcomingactivitiesdueinfo'] = 'All upcoming activities due insights are listed here. These students have received these insights directly.';
$string['usergroupselectorcount'] = '{$a->fullname} ({$a->groupcount})';

// Deprecated since Moodle 4.1.
$string['addcondition'] = 'Add condition';
Expand Down
3 changes: 2 additions & 1 deletion user/selector/lib.php
Expand Up @@ -833,7 +833,8 @@ class group_non_members_selector extends groups_user_selector_base {
* @return string
*/
public function output_user($user) {
return parent::output_user($user) . ' (' . $user->numgroups . ')';
return get_string('usergroupselectorcount', 'core_user',
(object) ['groupcount' => $user->numgroups, 'fullname' => parent::output_user($user)]);
}

/**
Expand Down

0 comments on commit 183d97a

Please sign in to comment.