Merge branch 'w12_MDL-38320_m25_logininfo' of git://github.com/skodak/moodle

This commit is contained in:
Damyon Wiese 2013-03-19 15:01:02 +08:00
commit 851c304f45
2 changed files with 2 additions and 2 deletions

View File

@ -601,7 +601,7 @@ class core_renderer extends renderer_base {
} 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 File

@ -419,7 +419,7 @@ class theme_mymobile_core_renderer extends core_renderer {
} 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 {