Block visibility by Role

Block visibility by Role

by Cory Gordon -
Number of replies: 4
Hi People

Using Moodle 1.9.2 here.

I have a question for you all:

Is there a way to change the visibility of a block dependent upon a users role?

There are certain blocks I want to make available to my tutors/markers but not my students.

Anyone have any ideas?

thanks
Cory
Average of ratings: -
In reply to Cory Gordon

Re: Block visibility by Role

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
First note that with any block that generates its content dynamically based on the current user, if there is no content for the user, the block will be invisible.

Alternatively, if it is an ordinary block on the course page (as opposed to, say, a sticky block) then you can override the moodle/block:view permission for the block.
In reply to Tim Hunt

Re: Block visibility by Role

by Cory Gordon -
Look at that! You learn something new everyday!

Thanks for that Tim.

/C
In reply to Cory Gordon

Re: Block visibility by Role

by Cory Gordon -
Another question - is it also possible to make the center column items that you can choose from the frontpage settings, visible dependent on the role of the user?
In reply to Cory Gordon

Re: Block visibility by Role

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I don't think so. Not without hacking the code.