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.
- Login as the administrator.
- In the dashboard for the administrator, click 'Customize this page' button.
- (Alternatively, goto any course, click 'Turn editing on' button.)
- In the Administration block, expand the Actions dropdown menu (typically looks like a gear), click Permissions.
- Goto the row for the 'View block' capability.
- 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.
- Still at the "Permissions in Block: Administration" page.
- Goto the row for the 'View block' capability.
- In the 'Roles with permission' column, click on the + icon.
- 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.