How to unassign a category role in specific course?

How to unassign a category role in specific course?

by Amir Elion -
Number of replies: 2

I have several people who have hidden teacher role in a course category. Which is fine for most courses in that category.

However, in one of the courses in the category I do not want them to have that role. When going into Assign Roles in the course - they do not appear there, so I cannot unassign.

Moodle version is 1.9.5+.

Suggestion?

Average of ratings: -
In reply to Amir Elion

Re: How to unassign a category role in specific course?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That's because it doesn't work that way. You cannot unassign them in the course because they were not assigned in the course - they were assigned in the category above.

Off the top of my head.... you could create a new role with the capabilities course:update and course:view (again from memory) set to 'prohibit' and *assign* that to the teachers in the course. The Prohibit should override the allow and (effectively) lock them out of the course.

This is all without trying it, but it should hopefully give you a clue where to look.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: How to unassign a category role in specific course?

by Amir Elion -

Hi Howard,

The approach worked like a charm with the new role (I called it "Course Blocker").
Only note is that I set the capabilities to "Prevent" and not "Prohibit".

Thanks!
Amir