I do not want pupils to be able to see a HTML Block on the front page

I do not want pupils to be able to see a HTML Block on the front page

Napisane bez: Mike Baldwin ()
Liczba ôdpowiedzi: 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?
W ôdpowiedzi na Mike Baldwin

Re: I do not want pupils to be able to see a HTML Block on the front page

Napisane bez: 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:
  • 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
(*) I would have preferred to assign CanViewBlock to all teachers in the TOTD block context, but for some reason, the list of potential users in the assign roles interface in the TOTD block context is empty.

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.

Bajlaga ($a)
W ôdpowiedzi na Mike Baldwin

Re: I do not want pupils to be able to see a HTML Block on the front page

Napisane bez: ian lake ()

There is an alternative, a block is listed in the modules and plug ins database called role specific html block which allows you to specify who should see the information.

Ian