Block permissions

Revision as of 21:30, 10 October 2009 by Mary Cooch (talk | contribs) (Hiding a block from guests)

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: Block permissions.

Block capabilities

Hiding a block from guests

Template:Moodle 1.9In Moodle 1.9 onwards, the capability moodle/block:view allows control of which users can view blocks. This feature works with all blocks, including contributed blocks.

Recent activity block header

To hide a particular block from guests:

  1. On the course homepage, click the "Turn editing on" button at the top-right of the page.
  2. Access the assign roles page via the assign roles icon (a face and mask) in the header of the block to be hidden.
  3. Click the "Override permissions" tab.
  4. Select the guest role.
  5. Set the capability moodle/block:view to prevent.
  6. Click the "Save changes" button.

Note: By default, only administrators are able to override permissions. Instructions on enabling teachers to override permissions can be found in Override permissions.

Displaying a block to selected users only

  1. Ensure you have hidden your block from non-logged in users as above
  2. In site administration>users>permissions>define roles, create a new role such as "front page block viewer"
  3. Click the "Turn editing on" button on your front page
  4. Click the "assign roles " icon on your block.
  5. Click the blue words of your new role. They link to the assign roles page. Choose who you want to allow to see this block (such as your teachers) by moving them from the right hand box to the left.
  6. Click the "Override permissions" tab
  7. For your new role, press the "allow" button to allow them to view this block
  8. For the authenticated user, press the "prevent" button to prevent them seeing this block
  9. Click the "Save changes"button.

See also