Assign Courses to Specific Users & Roles


Context

There are no functions to make a course available for a specific role of mentor or mentee. However, there is a workaround using custom fields. By using custom fields, you will be able to hide/display courses to specific users and roles. 

1 – Assign Courses to Specific Users

This first section will explain how to hide/display a course to specific users, regardless of their role (mentor or mentee). When creating a course module, there is an option to restrict module availability to users with specific selections within custom fields.

Example
In the example below, I made the “Intercultural Awareness” module from the “Equity, Diversity, and Inclusivity” course available only to users that have selected “sociology” on their profile as their major or desired major. Regardless of their role (mentor or mentee), as long as they selected “sociology” in that custom field, they will have access to the module. 

Profile Page

image-1664392344550.png

Module Creation Page

image-1664389216577.png

On my profile I selected “Sociology” as the Major/Desired Major option and as you see below, I can view the “Equity, Diversity, and Inclusivity” Course and all 3 modules.

image-1664391955291.png

When I change the selection on my profile under the Major/Desired Major field to something other than “sociology” I can no longer view the module.

image-1664392110640.png

To completely hide/display a course to certain users you would make the same custom fields restriction for all modules within the course.

Steps

1.0 Create a custom field containing multiple choices.

1.1 Make sure to select “Mentor and Mentee” when assigning the custom field to a role.

image-1664395976815.png

1.2 From the administrator's dashboard, click on “Courses” under the “Customize” section.

image-1664396121976.png

1.3 Click on the box under the Module's column corresponding to the course that needs to be restricted to specific users.

image-1664396158190.png

1.4 Click on “Edit” under the “Actions'' column of the first module listed.

image-1664396177856.png

1.5 Under the “Select custom fields”, click on the custom field you just created and that will be used to assign this module.

image-1664396216257.png

1.6 A new field will appear asking you to indicate which selection(s) will be used to assign this module.

image-1664396242724.png

1.6.1 In this example, I am making this module accessible only to users that have selected either “philosophy”, “psychology” or “sociology” from the “Major/Desired Major” custom field. Therefore, the module will be display for users that made one of these selections, but hidden to users that have not selected these options. 

 

 

 

 

 

 

 

 

Please note that when a user makes no selection in the custom field, it will also prevent them from seeing the module/course.

1.7 Scroll down and click Save.

image-1664396310855.png

1.8 Repeat steps 1.4 to 1.7 for all other modules within the same course to fully restrict a course based on custom field selections. 


2 – Assign Courses to Specific Roles 

It is also possible to assign a course to the specific role of mentor or mentee using custom fields. We will slightly tweak the process explained in the previous section above. 

Steps

2.0 Create a custom field containing multiple choices.

2.1 This is where we will tweak the process. Make sure to select only one of the two roles when assigning the custom field to a role. For example, if I want to use this field to assign the course to mentors, I will select “Mentor”.

image-1664397452798.png

2.2 From the administrator's dashboard, click on “Courses” under the “Customize” section.

image-1664396121976.png

2.3 Click on the box under the Module's column corresponding to the course that needs to be restricted to specific users.

image-1664396158190.png

2.4 Click on “Edit” under the “Actions'' column of the first module listed.

image-1664396177856.png

2.5 Under the “Select custom fields”, click on the custom field you just created for mentors and that will be used to assign this module to mentors.

image-1664398862939.png

2.6 A new field will appear asking you to indicate which selection(s) will be used to assign this module.

image-1664398900389.png

2.6.1 In this example, I want to assign this module to mentors and because I created this field for mentors only I need to select all the options listed so that no matter what a mentor select, they will be able to view this module.  

 

 

 

 

 

 

 

 

Please note that when a user makes no selection in the custom field, it will also prevent them from seeing the module/course.

2.7 Scroll down and click Save.

image-1664399083334.png

2.8 Repeat steps 2.4 to 2.7 for all other modules within the same course to fully restrict a course based on custom field selections.