Permalink
Browse files

MDL-38320 fix role name display when roles switched

  • Loading branch information...
1 parent 29f8c09 commit 54aabc8200f3075680177895c10e246edf2dfa89 @skodak skodak committed Mar 17, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/outputrenderers.php
  2. +1 −1 theme/mymobile/renderers.php
View
@@ -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) {
@@ -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 {

0 comments on commit 54aabc8

Please sign in to comment.