Greetings fellow Moodlers! Role, role, role your boat… Oh wait, that’s not how it goes, is it? Sorry, we’ve got roles on the mind!
There are multiple roles in Moodle. The roles functionality enables a wide range of capabilities, from students who need to be forum moderators to department chairs who need to be students and more. In fact, Moodle.org defines a role as “…a collection of permissions defined for the whole system that you can assign to specific users in specific contexts.” Different combinations of roles and contexts result in a user’s ability to do something on any given page or what “permissions” a user is allowed.
Manage Users with Multiple Roles
The most common roles are of student and teacher in the context of a course. A common challenge faculty or teachers face is that they would like to see their courses from the student’s perspective or the student role.
With that said, we wanted to illustrate how to best manage users with multiple roles. More specifically, this article will focus on how to manage users who need multiple roles within a single course. There are three recommended ways to accomplish this:
- Use the “Switch role to…” functionality
- Use the “Log in as” functionality
- Create a separate test account and assign that account to the course(s) in the student role
Using the “Switch role to…” functionality:
The easiest and most straightforward option for managing multiple roles in Moodle is the “Switch role to” functionality. This is a quick, convenient option to see your course from your user’s perspective. If you are using built-in Moodle features like Restrict Access or Hidden Visibility, this can be a great way to confirm that these settings are working.
Step 1 – Let’s say you would like the editing teacher role to be able to switch to the student role. As indicated in the screenshot below, simply check the appropriate box on the Allow role switches page (http://yourmoodleurl/admin/roles/allow.php?mode=switch).
NOTE: The selected role must also have the moodle/role:switchroles capability to be able to switch.
Step 2 – When logged in as an editing teacher, for example, view the desired course and choose the “Switch role to…” on the left-hand navigation and a dropdown will appear, listing all roles that have been allowed for your role to switch to. Select the desired role.
Note: The only potential downside of using the “Switch role to…” functionality is that it doesn’t always fully simulate what the student sees. The biggest area it differs is on the Assignment submission page. It will not show you the submit button that the student sees. However, if your assignment dates are open, you can be confident that this is working just fine!
Using the “Log in as” functionality:
This option is the second-simplest method to setup. Given the more powerful nature of this functionality, its availability is limited and rightfully so… This option grants “log in as” privileges beyond the manager role and carries with it the ability to make changes while logged in as the other user, which can cause complications if not used carefully; therefore, some organizations hesitate to give this privilege to instructors.
Step 1 – Confirm that your role has “Log in as” permission. This is done by editing the desired role and looking for the “moodle/user:loginas” capability. Make sure this functionality is allowed for the role. By default, the Manager and Administrator roles have this permission allowed. Any other roles would need to be updated to allow.
CAUTION: Modifying role permissions should only be done as a coordinated, carefully considered process, taking into account the overall impact to your Moodle site.
Step 2 – Access the user profile of the desired user and select the “Log in as…” function. In the course context, you will be restricted to this user’s access in the course.
Another CAUTION here: Tread carefully while logged in as the other user. Remember that you can make changes in the Moodle site as this user and doing so may cause complications.
Step 3 – To return to your own user login session, you will need to log out of the Moodle site and log back in using your own user account. You will be returned to the same page that you were on when you logged out.
Creating a separate user account in the desired role:
The final way to see a course from the perspective of another role is to create a test user account for this purpose and assign that user the desired role. This is what we like to call the “secret shopper method.”
Step 1 – Create a separate user account in your Moodle site. This can be a manual account or it can be populated from an account that exists in your user authentication system. The latter option is more complicated, but certainly doable when a fully-automated process is what you are looking for.
Step 2 – Enroll this user into the desired course and assign this user the desired role.
Step 3 – Become the “secret shopper” in the desired course by logging into your Moodle site using this new user account. View the course.
Many organizations have a handful of these test accounts available for instructors to use to view course content as needed.
BONUS TIP: Do this in a separate browser from your own login session so you can easily toggle back and forth to evaluate changes.
The ability to see your course from the perspective of another user by simply using a “Switch Roles” option is a unique feature to Moodle, and one that makes it particularly user friendly! Additionally, the “Log in as” and “Secret Shopper” methods will offer a similar solution, but the ease and simplicity of the “Switch Roles” option makes that one our recommended method.
If you would like to speak to a Moodle expert regarding other Moodle best practices or how-to’s, simply request a demonstration below.