]> git.mjollnir.org Git - moodle.git/commitdiff
role administration MDL-20413 up arrow next to top-most role in admin -> users -...
authorAndrew Davis <andrew@affinitysoftware.net>
Wed, 25 Nov 2009 06:03:25 +0000 (06:03 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Wed, 25 Nov 2009 06:03:25 +0000 (06:03 +0000)
admin/roles/manage.php

index f321c4583563852b73372125a10201b50ca1d999..633c8ae529c7757b5e5ed1722b2876fa0ce6ed90 100755 (executable)
 
 /// Print a list of roles with edit/copy/delete/reorder icons.
     $table->data = array();
+    $firstrole = reset($roles);
     $lastrole = end($roles);
     foreach ($roles as $role) {
 
 
     /// Icons:
         // move up
-        if ($role->sortorder != 0) {
+        if ($role->sortorder != $firstrole->sortorder) {
             $row[3] .= get_action_icon($baseurl . '?action=moveup&amp;roleid=' . $role->id . '&amp;sesskey=' . sesskey(), 'up', $strmoveup, $strmoveup);
         } else {
             $row[3] .= get_spacer();