From 6f55ce1893ceb2b7d0166bca7c458aca4d3c4696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Tue, 9 Apr 2013 08:31:25 +0200 Subject: [PATCH] MDL-38927 use role->localname to get real role name --- enrol/users_forms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enrol/users_forms.php b/enrol/users_forms.php index 21279358739..4da04391230 100644 --- a/enrol/users_forms.php +++ b/enrol/users_forms.php @@ -157,10 +157,10 @@ class enrol_users_filter_form extends moodleform { // names if applied. The reason for not restricting to roles that can // be assigned at course level is that upper-level roles display in the // enrolments table so it makes sense to let users filter by them. - $allroles = get_all_roles($manager->get_context()); + $allroles = $manager->get_all_roles(); $rolenames = array(); foreach ($allroles as $id => $role) { - $rolenames[$id] = $role->name; + $rolenames[$id] = $role->localname; } $mform->addElement('select', 'role', get_string('role'), array(0 => get_string('all')) + $rolenames);