General developer forum

How to give role teacher for certain users on certain sections in a course

 
Picture of Mario Gharib
How to give role teacher for certain users on certain sections in a course
 


Dear Moodlers,

I already know that It is possible to give a certain subscribed user, the role Teacher LOCALLY in a certain activity, whereas the same user has the role Student for the whole class,

I would like to know if there is a way to give a certain subscried user in a course the role Teacher not for a certain activity but for a whole section, whereas this user will have the role student for the whole class.

Thanks in advanced for helping.

 
Average of ratings: -
Picture of Mark Johnson
Re: How to give role teacher for certain users on certain sections in a course
Core developersParticularly helpful MoodlersPlugin developers
Unfortunately this isn't possible using Moodle's roles and capabilities, since sections do not have their own context as courses and activities do.  The closest you could do would be to create a plugin which is triggered when a role is assigned to an activity (you could have a special role like "section teacher"), then assigns that role to other activities within that section.
 
Average of ratings: -
Picture of Melanie Scott
Re: How to give role teacher for certain users on certain sections in a course
Particularly helpful Moodlers

Of give Teacher permission in each activity in the section.

 
Average of ratings: -