Course categories don't show anymore in Course settings

Course categories don't show anymore in Course settings

by Toms Urdze -
Number of replies: 7

I have the following problem:

If a teacher opens the course settings, the Course category box displays only the course's current category but does not show any of the other categories available on the site.

Screenshot


In the role permissions "Change course category" is allowed.

The categories show just fine in the courses list, and I am able to add a new course to any of them.

Can someone point me in the right direction?

Kind regards,

Toms

Average of ratings: -
In reply to Toms Urdze

Re: Course categories don't show anymore in Course settings

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

Hi Toms,

For other course categories to show in the Course category select menu, the teacher must have the "Change course category" capability in these other categories. Normally, a user is assigned the role of teacher in a course and not a category context, hence only the current course category is displayed.

Average of ratings: Useful (1)
In reply to Helen Foster

Re: Course categories don't show anymore in Course settings

by Toms Urdze -
Thank you for the swift response!

I am still not quiet clear what to do: The category permissions show that the Lecturer (aka Teacher) role has the capability "Change course category". But when I check the permissions of a specific teacher, it says "No" in the respective row.
In reply to Toms Urdze

Re: Course categories don't show anymore in Course settings

by Toms Urdze -
I just want to mention that I found a solution.

I have created a new role with only one capability: "Change course category". When I assign this role to Teachers at the system level, they are able to change the category of their course.
Average of ratings: Useful (2)
In reply to Toms Urdze

Re: Course categories don't show anymore in Course settings [Solved]

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

Well done for figuring out a solution and thanks for posting it!

As you've found, the "Change course category" capability must be given to a teacher by assigning them a role, either in a category context, or as a system role (then all course categories on the site are shown in the select menu).

In reply to Helen Foster

Re: Course categories don't show anymore in Course settings [Solved]

by Thomas Hucke -
Hello Helen!
How can I do just that by only changing the teacher role without creating an additional role? I've tried checking the System and Category checkboxes in the teacher profile, but teachers still cannot change the category of their courses.

Regards,
Thomas
In reply to Thomas Hucke

Re: Course categories don't show anymore in Course settings [Solved]

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 Thomas,

The System and Category checkboxes on the edit role page are for allowing the role to be assigned in these contexts. Normally the Teacher role is assigned in the course context i.e. you enrol a teacher in the course and give them the role of Teacher.

You can assign teachers the role of Teacher in the system context by going to Site administration / Users / Permissions / Assign system roles. However, they would then have the role of Teacher in every course on your site. This is most likely not what you want! Thus, you would need to create an additional role, as described in the documentation Capabilities/moodle/course:changecategory.

In reply to Helen Foster

Re: Course categories don't show anymore in Course settings [Solved]

by Thomas Hucke -
Helen, I appreciate very much your answer, thank you.
With best regards,

Thomas.