I do not want pupils to be able to see a HTML Block on the front page
by Mike Baldwin -
Number of replies: 3
I have created a VLE tip of the day HTML block on the front page. I only want the teaching staff to see this. When I click on Roles it only lists the 2 administrators as potential users. At the moment anyone who logs in can see this tip of the day, there does not seem to be a way of only displaying this block to select users. Anyone manage to get over this?
In reply to Mike Baldwin
Re: I do not want pupils to be able to see a HTML Block on the front page
by John Isner -
All users, by default, are assigned the role of Authenticated user in the System context when they login. The Authenticated user role has moodle/block:view ("View block") = Allow. This is why all users can see blocks on the Front page. To allow only the teaching staff to view the Tip of the Day (TOTD) block, here is what I would do:
FYI I have attached screenshots of the Role debugger output showing the permissions for a (typical) teacher and a (typical) student in the TOTD block.
- create a new role CanViewBlock with moodle/block:view = Allow and all other permissions Not set
- assign CanViewBlock to all teachers in the Front page context (*)
- override the Authenticated user role in the TOTD block context, setting moodle/block:view = Prevent
FYI I have attached screenshots of the Role debugger output showing the permissions for a (typical) teacher and a (typical) student in the TOTD block.
In reply to John Isner
Re: I do not want pupils to be able to see a HTML Block on the front page
by Mike Baldwin -
Thank you, I will give this a try