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

Block permissions: Difference between revisions

From MoodleDocs
(see also video link added)
(block capabilities, hiding a block from guests)
Line 1: Line 1:
{{Moodle 1.9}}In Moodle 1.9 onwards, there is a [[Capabilities/moodle/block:view|moodle/block:view]] capability which allows control of which users can view blocks from the roles system. This feature works with all blocks (including third party blocks).
==Block capabilities==


==Example: Hiding a course block from guests==
*[[Capabilities/moodle/site:manageblocks|moodle/site:manageblocks]]
# Login as a user who has permission to control blocks on the page you are interested in (e.g. teacher/admin).
*[[Capabilities/moodle/my:manageblocks|moodle/my:manageblocks]] (from 1.8 onwards)
# At the top of every block there should be a face-and-mask icon, the mouseover tooltop says "assign roles", click this icon on the top of the course block.
*[[Capabilities/moodle/tag:editblocks|moodle/tag:editblocks]] (from 1.9 onwards)
# Click on "override roles" to switch to viewing role overrides.
*[[Capabilities/moodle/block:view|moodle/block:view]] (from 1.9 onwards)
# Choose the "Guest" role from the list of roles.
 
# Change the [[Capabilities/moodle/block:view|View Block]] permission to prevent.
==Hiding a block from guests==
 
{{Moodle 1.9}}In Moodle 1.9 onwards, the capability [[Capabilities/moodle/block:view|moodle/block:view]] allows control of which users can view blocks. This feature works with all blocks, including contributed blocks.
 
To hide a particular block from guests:
# Access the assign roles page via the assign roles icon (a face and mask) in the header of the block to be hidden.
# Click the "Override permissions" tab.
# Select the guest role.
# Set the capability [[Capabilities/moodle/block:view|moodle/block:view]] to prevent.
# Click the "Save changes" button.
# Click the "Save changes" button.
# Guests should no longer be able to see the course block.
 
Note: By default, only administrators are able to override permissions. Instructions on enabling teachers to override permissions can be found in [[Override permissions]].


==See also==
==See also==

Revision as of 08:20, 6 March 2008

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.

To hide a particular block from guests:

  1. Access the assign roles page via the assign roles icon (a face and mask) in the header of the block to be hidden.
  2. Click the "Override permissions" tab.
  3. Select the guest role.
  4. Set the capability moodle/block:view to prevent.
  5. 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.

See also