Course list viewer role: Difference between revisions
From MoodleDocs
m (→Creating a new role: Remove unclosed opening parenthesis) |
|||
Line 11: | Line 11: | ||
#From 'Site administration / Users / Permissions / Define roles' and click the "Add a new role" button. | #From 'Site administration / Users / Permissions / Define roles' and click the "Add a new role" button. | ||
#For archetype role choose "No role." | #For archetype role choose "No role." | ||
#Give the role a short name | #Give the role a short name such as "Course list viewer", but it can be anything appropriate. | ||
#Give the role a custom full name | #Give the role a custom full name such as "Course list viewer", but it can be anything appropriate. | ||
#Find and allow capability [[Capabilities/moodle/category:viewcourselist|moodle/category:viewcourselist]] for this role | #Find and allow capability [[Capabilities/moodle/category:viewcourselist|moodle/category:viewcourselist]] for this role | ||
#To allow users to view courses in all categories, check the "System" context. Or... | #To allow users to view courses in all categories, check the "System" context. Or... |
Latest revision as of 11:52, 19 August 2020
The Course list viewer role may be used to restrict or allow lists of courses to be viewed by selected users.
By default, the Authenticated user role can see the list of all courses because the capability moodle/category:viewcourselist is allowed.
If the capability is removed globally from the authenticated user, then the Course list viewer role may be assigned to users allowed to view courses in a certain category/certain categories.
Creating a new role
- From 'Site administration / Users / Permissions / Define roles', edit the Authenticated user role to prevent the capability moodle/category:viewcourselist
- Do the same for the Guest role
- From 'Site administration / Users / Permissions / Define roles' and click the "Add a new role" button.
- For archetype role choose "No role."
- Give the role a short name such as "Course list viewer", but it can be anything appropriate.
- Give the role a custom full name such as "Course list viewer", but it can be anything appropriate.
- Find and allow capability moodle/category:viewcourselist for this role
- To allow users to view courses in all categories, check the "System" context. Or...
- To allow users to view courses in specific categories, check the "Category" context
Assigning the role to users
- For the system context role (allowing users to see all course categories) go to 'Site administration / Users / Permissions /Assign system roles
- Click the link Course list viewer and move your selected users from the right box to the left box. Or...
- For the category context role (allowing users to see courses in a particular category) go to 'Site administration / Courses / Manage course and categories'
- In the course categories list, click the arrow next to the cog icon to access the Assign roles link.
- Click the link Course list viewer and move your selected users from the right box to the left box.