From dafb79106e8d7ed74c20e6885067d82231069255 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 16 May 2014 13:51:58 +1200 Subject: [PATCH] MDL-45583 badges: check parent contexts consistantly when checking required role. --- badges/award.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/badges/award.php b/badges/award.php index 124e178f121..e288fe2da76 100644 --- a/badges/award.php +++ b/badges/award.php @@ -120,7 +120,7 @@ if (count($acceptedroles) > 1) { } } else { // User has to be an admin or the one with the required role. - $users = get_role_users($acceptedroles[0], $context, false, 'u.id', 'u.id ASC'); + $users = get_role_users($acceptedroles[0], $context, true, 'u.id', 'u.id ASC'); $usersids = array_keys($users); if (!$isadmin && !in_array($USER->id, $usersids)) { echo $OUTPUT->header();