I wish to have a HTML block which is only visible to teachers. However, if I go to permissions and prevent Authenticated user from viewing the block and Allow teachers, they can still not see it.
It would appear that authenticated user must have view for anyone to see it.
Then if I create a authenticated user role for MyBlock (see - http://docs.moodle.org/20/en/Block_permissions) I have over 2000 teachers to add to the role. To search and locate these individually is too much work. I tried searching on email domain (teachers.edu) but this does not work.
Does anyone have any suggestions?
Can the block be hidden from users using php?
I used to use if (isteacherinanycourse()) but this does not seem to work with Moodle 2.1
Thanks