Hide administration block from students, but not managers

Hide administration block from students, but not managers

by Mike Finch -
Number of replies: 0

Moodle 3.1.4

In a previous forum, "Hiding the Administration Block for Students?", the discussion tapered off with the conclusion that the Administration block could be hidden in each course, but not site wide.

However, I have learned how to hide the Administration block site wide, for any roles I desire.  I did the following.

  1. Login as the administrator.
  2. In the dashboard for the administrator, click 'Customize this page' button.
  3. (Alternatively, goto any course, click 'Turn editing on' button.)
  4. In the Administration block, expand the Actions dropdown menu (typically looks like a gear), click Permissions.
  5. Goto the row for the 'View block' capability.
  6. In the 'Roles with permission' column, click on the X icon for each role that you want the Administration block hidden from.

Here is an example screenshot of the block permissions.


In my situation, I want to be very draconian and prevent any student from seeing the Administration block anywhere in the site.

At first, I removed the capability for just the Student role.  But that was a mistake.  The students could still see the Administration block.  I realized that this was because everybody was also an authenticated user.  Therefore, I instead removed the capability for the 'Authenticated User' role.  With just that one change, I accomplished my goal.  Only the administrator can see the Administration block.

But, I have a few users who are managers, and I do want them to see the Administration block.  Therefore, I did the following.

  1. Still at the "Permissions in Block: Administration" page.
  2. Goto the row for the 'View block' capability.
  3. In the 'Roles with permission' column, click on the + icon.
  4. In the popup, click the 'Manager' button.

With that additional change, I accomplished everything I wanted.  Here is a screenshot of the capability overview after my changes.


Average of ratings: Useful (5)