diff --git a/user/index.php b/user/index.php index e137056f974..fcc43594b0d 100644 --- a/user/index.php +++ b/user/index.php @@ -442,7 +442,12 @@ error('That role does not exist'); } $a->number = $totalcount; - $a->role = $currentrole->name; + // MDL-12217, use course specific rolename + if (isset($rolenames[$currentrole->id])){ + $a->role = $rolenames[$currentrole->id]; + }else{ + $a->role = $currentrole->name;//safety net + } $heading = format_string(get_string('xuserswiththerole', 'role', $a)); if (user_can_assign($context, $roleid)) { $heading .= ' ';