Capability for teacher role to view a specific part of a theme

Capability for teacher role to view a specific part of a theme

by Franky Just -
Number of replies: 2

I want to show a loggedin user with a teacher role a specific part of the theme layout, site wide and so not only within his/her courses. I've looked in the documentation and in the forums but this seems not easy to establish. For an admin this is no problem, but for other roles this seems a problem. So far I understand the Moodle system, it seems not possible within a theme to add new capabilities, where I can built on. And grabbing one of the site wide capabilities for teachers leads to errors. Is there a way or a workaround for this? M3.8 - child theme of Boost.

Average of ratings: -
In reply to Franky Just

Re: Capability for teacher role to view a specific part of a theme

by Franky Just -
and in addition to this post is the question if in local plugins capabilities can be used. It seems that this is also not possible, this would limit the use of capabilities further.

I've still no solution found for the first issue. I've tried several options, but none seems acceptable within Moodle.
In reply to Franky Just

Re: Capability for teacher role to view a specific part of a theme

by Franky Just -
I found a solution for giving a teacher a view on a specific part of a theme. It can be achieved by using a system-context view capability for the teacher and adding this to the specific part of the theme. And then give the teacher a global role (system wide). You have to check the permissions for this role then thoroughly, so that this role doesn't get unwanted permissions. It's a specific workaround, Moodle doesn't seem to have better functionality to achieve this kind of things.