Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-38320 fix role name display when roles switched

  • Loading branch information...
commit 54aabc8200f3075680177895c10e246edf2dfa89 1 parent 29f8c09
@skodak skodak authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/outputrenderers.php
  2. +1 −1  theme/mymobile/renderers.php
View
2  lib/outputrenderers.php
@@ -571,7 +571,7 @@ public function login_info($withlinks = null) {
} else if (is_role_switched($course->id)) { // Has switched roles
$rolename = '';
if ($role = $DB->get_record('role', array('id'=>$USER->access['rsw'][$context->path]))) {
- $rolename = ': '.format_string($role->name);
+ $rolename = ': '.role_get_name($role, $context);
}
$loggedinas = get_string('loggedinas', 'moodle', $username).$rolename;
if ($withlinks) {
View
2  theme/mymobile/renderers.php
@@ -419,7 +419,7 @@ public function login_info_footer() {
} else if (is_role_switched($course->id)) { // Has switched roles
$rolename = '';
if ($role = $DB->get_record('role', array('id'=>$USER->access['rsw'][$context->path]))) {
- $rolename = ': '.format_string($role->name);
+ $rolename = ': '.role_get_name($role, $context);
}
$loggedinas = get_string('loggedinas', 'moodle', $username).$rolename." (<a href=\"$CFG->wwwroot/course/view.php?id=$course->id&amp;switchrole=0&amp;sesskey=".sesskey()."\">".get_string('switchrolereturn').'</a>)';
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.