]> git.mjollnir.org Git - moodle.git/commitdiff
merged taking out warning
authortoyomoyo <toyomoyo>
Mon, 6 Nov 2006 08:27:31 +0000 (08:27 +0000)
committertoyomoyo <toyomoyo>
Mon, 6 Nov 2006 08:27:31 +0000 (08:27 +0000)
user/index.php

index 654bbb406a50c7153f731f62d1569040a228a07c..7c103de85c566343b4565aae5f19e42d18cff5a5 100644 (file)
         $sitecontext = get_context_instance(CONTEXT_SYSTEM);
         $doanythingroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, $sitecontext);
 
-          foreach ($roles as $role) {
+        foreach ($roles as $role) {
             if (isset($doanythingroles[$role->id])) {   // Avoid this role (ie admin)
                 unset($roles[$role->id]);
                 continue;
 
     /// If there are multiple Roles in the course, then show a drop down menu for switching
 
-    if ($rolenames) {
+    if (!empty($rolenames)) {
         echo '<div class="rolesform">';
         echo get_string('currentrole', 'role').': ';
         $rolenames = array(0 => get_string('all')) + $rolenames;