Capabilities to change course category

Capabilities to change course category

by Leonard Michlmayr -
Number of replies: 1

I want to give all teachers the capability to change the category of their courses. The editingteacher role has 'core/course:changecategory' and all the teachers also have the role coursecreator.

The problem:
When a teacher edits his/her own course with course/edit.php the drop-down list of categories is empty. The teacher cannot change the category.

What capability am I missing?

UPDATE: after enabling corse/course:changecategory for the role coursecreator everything works as expected. I wonder if this is the way that it is ment to be, because this way, any coursecreator gains the capability to change the category of any course for which he/she has the capability core/course:update.

Average of ratings: -
In reply to Leonard Michlmayr

Re: Capabilities to change course category

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello,

As mentioned in the documentation Capabilities/moodle/course:changecategory, a teacher can only change the course category in the course settings if they have the capability moodle/course:changecategory in other categories.

Your solution of enabling the capability for the course creator role works because teachers are assigned the role of course creator as a system or category role.

PS I am just moving your post to the Roles and permissions forum...