MDL-8249 localise standard role names and descriptions if empty

This commit is contained in:
Petr Skoda
2012-07-06 08:22:34 +02:00
committed by Petr Škoda
parent 2cbdaa77ea
commit c52551dc3c
34 changed files with 609 additions and 415 deletions
+3 -2
View File
@@ -45,8 +45,9 @@ if ($hassiteconfig
$defaultuserid = null;
$defaultguestid = null;
foreach (get_all_roles() as $role) {
$rolename = strip_tags(format_string($role->name)) . ' ('. $role->shortname . ')';
$roles = role_fix_names(get_all_roles(), null, ROLENAME_ORIGINALANDSHORT);
foreach ($roles as $role) {
$rolename = $role->localname;
switch ($role->archetype) {
case 'manager':
$creatornewroles[$role->id] = $rolename;