While core Moodle doesn’t support full Moodle multitenancy, it does provide options for controlling which content is visible to a particular set of users. One of the easiest paths to hiding certain content is to use course enrollments and have all categories hidden. This works great if there are prescribed enrollment logic and rules. Users just access their courses from their dashboard and never see any categories or courses they’re not enrolled in. But what if you want your users to be able to browse and select their own courses?
Assigning Custom Roles and Permission Overrides
That’s where some custom system roles, hidden categories, and permission overrides come into play. By assigning users a system role and giving that role permission to see specific hidden categories you can let some users see specific categories while hiding them from other users. While you can set this up manually, we prefer automation whenever possible. You can automate this process with a few helpful plugins – Profile field based cohort membership and Cohort role synchronization.
How do we put this all together? It starts with your users’ profile fields. Usually we map something like department or a custom field, like region, to automatically assign users to a specific cohort. In the image below you can see that we’re using a custom field called Destination.
Next, we set up a custom system role based on authenticated users for each cohort. Each cohort maps automatically into this system role. You can see in the image below that we named each cohort and role the same for simplicity.
The last step is hiding the categories and applying the permission override on a per category basis. You’ll want to give your custom role(s) the “See hidden categories” permission (moodle/category:viewhiddencategories) just for the categories you want them to see.
Ultimately, how does this all look to end users? Below are two images from the same site with different users logged in. Notice the difference?
Now you know how to create user-centric Moodle experiences for your users!
Totara has similar native functionality via the Audience Visibility settings, which is a little more automatic. As part of eThink’s fully managed model, we provide the initial set up for these kinds of solutions for our clients and provide support as they use them in production.
Learn More About Moodle Multitenancy
See our VP of Services, Courtney Bentley, and Director of Customer Solutions, Jeremy Schweitzer, discuss how you can “Manage Multiple Organizations with Moodle Magic” at the US 2018 US MoodleMoot below.
Interested in learning more? Speak with one of our experts!Request a Demo