From: vyshane Date: Tue, 22 Aug 2006 05:44:32 +0000 (+0000) Subject: Fixes: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=021a7467b506292afe7722d13e7e57bd0d5a6ded;p=moodle.git Fixes: 1) has_capability call used in fullname() 2) initialised array $options 3) $context->level has been renamed to $context->aggregatelevel --- diff --git a/admin/roles/override.php b/admin/roles/override.php index 4bb1ff63f7..1a2ac84957 100755 --- a/admin/roles/override.php +++ b/admin/roles/override.php @@ -40,11 +40,11 @@ $participants = get_string("participants"); $user = get_record('user', 'id', $userid); - $fullname = fullname($user, isteacher($course->id)); + $fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context)); $straction = get_string('overrideroles', 'role'); // we got a few tabs there - if ($context->level == CONTEXT_USERID) { + if ($context->aggregatelevel == CONTEXT_USERID) { /// course header if ($courseid!= SITEID) { @@ -121,6 +121,7 @@ // this needs to check capability too $role = get_records('role'); + $options = array(); foreach ($role as $rolex) { if (user_can_override($context, $rolex->id)) { $options[$rolex->id] = $rolex->name;