]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes:
authorvyshane <vyshane>
Tue, 22 Aug 2006 05:44:32 +0000 (05:44 +0000)
committervyshane <vyshane>
Tue, 22 Aug 2006 05:44:32 +0000 (05:44 +0000)
1) has_capability call used in fullname()
2) initialised array $options
3) $context->level has been renamed to $context->aggregatelevel

admin/roles/override.php

index 4bb1ff63f7f6aedd781f5d5ebd9ea788732f06f6..1a2ac84957861029fc3e5f1b945a11f313e7cb69 100755 (executable)
     
     $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) {
       
      // 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;