-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
2.2.5
-
MOODLE_22_STABLE
Currently the only way to deploy a sticky block in every course is to add it to the front page of the site and set it to display throughout the site. You then go into a course and modify it to display on all course main pages.
To my knowledge this is the only way to create a site wide sticky block and as a result the block is listed as a "System" block.
I have set up 2 HTML Sticky blocks site wide that appear on every course main page. In the block configuration you are allowed to set "block:view" permissions. I am able to restrict the "block:view" permissions to just the student role for a block we only want students to see. The problem with this is even though the user has a student role in the course the sticky block is a "system" block so therefore they are interpreted as "authenticated user" to the block.
Unless I am missing something I don't see anyway the block permissions would work site wide for a block unless you put every student in a "student" system wide role. The only other options you are left with are assigning permissions on each individual block or building the block in each individual course.
I can elaborate if needed but hopefully that makes sense.
Steps to recreate issue:
1. Add HTML block to the front page of Moodle.
2. Edit block and set it to appear on every page.
3. Go into a course and edit the same block to appear on every course main page.
4. Adjust permissions of block to where only "student" can view the block. This is accomplished by clicking on the "Assign Roles" icon and then clicking on permission in the block settings.
5. Remove all of the roles listed in block:view to where just the student role is listed.
6. Login as a student in any course and you will see they can't view the block.