Add a restriction on categories

Add a restriction on categories

by dina gouda -
Number of replies: 1

I have two types of user(blind user- deaf user) I want to specialized the categories (categories for blind - categories for deaf ) , so I want to add a restriction on categories depending on a custom field of users ( user type ) which I added  

Average of ratings: -
In reply to dina gouda

Re: Add a restriction on categories

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't think you can implement restrictions over course categories based on custom user fields. You want to use the permissions system for this.

There are several ways to approach this. One would be to create a role for each type of user, assign the roles to users at system level, then use permission overrides to prevent users with a particualar role from viewing a particular category. Another would be to remove permissions from the authenticated user role that allow users to view courses, create a new role that does allow users to view courses, then assign the new role in the course category context to users who should be allowed to view that category.