From c1a657cc1fdaa37c370bbb80e9d58b106c902510 Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 22 Aug 2006 05:35:52 +0000 Subject: [PATCH] Bug fixes: 1) Replaced isteacher call in fullname ($course undefined) 2) Initialised $options array --- admin/roles/assign.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/roles/assign.php b/admin/roles/assign.php index 250def848d..9fb40a83c5 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -64,7 +64,7 @@ $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)); // we got a few tabs there if ($context->aggregatelevel == CONTEXT_USERID) { @@ -161,6 +161,7 @@ // this needs to check capability too $role = get_records('role'); + $options = array(); foreach ($role as $rolex) { if (user_can_assign($context, $rolex->id)) { $options[$rolex->id] = $rolex->name; -- 2.39.5