Access restrictions can be used in Moodle to prevent students from navigating to specific resources or activities based on specific conditions. This is valuable for reducing cognitive overload for students, creating differentiated assessments, and much more.
This article provides several examples for working with access restrictions.
Finding Restrict Access Settings
The access restriction settings are found in the Settings page of any activity or resource in Moodle. There are two ways to get into the Settings page.
To access Restrict access settings for an activity:
- Navigate to a given activity.
- In the activity menu at the top of the page, select the Settings tab.
- Find and expand the Restrict access section.
If no restrictions have been set, the Restrict access field will be set to None with an Add restriction button available.
Using Restrict Access
In order to add any restriction, click the Add restriction button.
Access can be restricted by the following conditions:
- Activity completion
- Time and date
- Gamification
- Grades
- Groups and Groupings
- Mobile use
- User profile fields
Multiple restrictions can be applied at once, and there is also an option to apply nested conditions for advanced restrictions.
RESTRICTING BASED ON DATE AND TIME
Activities may need to have access restricted based on timing, which is like a Quiz's open and close time. This example will set an access restriction so that students can only access the activity between September 13th, 2022 at 8:00AM, and September 15th, 2022 at 11:55PM.
To add a Date restriction:
- In the Restrict access box, click the Add restriction button.
- In the Add restriction... pop-up window, click the Date button.
An option will appear in the Access restrictions tool, with two statements:
- Student must match the following
- This field specifies the condition for any restrictions.
- It can be set to Must, indicating that all conditions must be true for students to access the activity, or Must not, indicating that they all must be false.
- Date from DD Month YYYY HH:MM, which displays the current date
- This field specifies the date and time the activity will become available or unavailable.
- By default, it is set to the current date at 00:00 (in 24-hour time, so 12:00AM) hours.
- It can be set to From, indicating that the restriction will stop starting on a given date, or Until, indicating it will be unrestricted until then.
To change the date and time to Sept. 13th, 2022 at 08:00, or 8:00AM:
- In the drop-down menu that specifies the current day, select 22 from the list.
- In the menu for the month, select September.
- In the menu for the year, select 2022.
- In the menu for the hours, select 08.
After these changes are made, the first date restriction will display Date from 13 September 2022 08:00.
To make another Date restriction so that the activity closes after September 15th, 2022 at 11:55PM:
- In the Restrict access box, click the Add restriction button.
- In the Add restriction... pop-up window, click the Date button.
- In the drop-down menu that specifies From, select the Until option from the list.
- In the menu for the day, select 15.
- In the menu for the month, select September.
- In the menu for the year, select 2022.
- In the menu for the hours, select 23.
- In the menu for the minutes, select 55.
The activity is now restricted from the 13th of September 2022 at 8:00AM until the 15th of September 2022 at 11:55PM.
The conditions should look like this:
RESTRICTING BASED ON GROUPS
Assignments may need to be restricted based on a Group role assigned to a student. For example, an assignment or group of assignments could be assigned to a given group named Group Alpha.
For specific guidance on creating groups and adding students to them, please review the "Creating and Adding Users to Moodle Groups" article.
To add a Group restriction:
- In the Restrict access box, click the Add restriction button.
- In the Add restriction... pop-up window, click the Group button.
An option will appear in the Access restrictions tool, with two statements:
- Student must match the following
- Specifies the condition for any restrictions.
- Group Choose...
- Specifies the Group that can or can't access the activity.
To set the appropriate group:
- Click the drop-down menu for Choose....
- Select the appropriate Group from the list.
It's possible to hide the activity from students not in the given Group. To do so, select the open eye icon next to the Group restriction. This will change to a crossed-out eye, indicating that the assignment is fully hidden unless the student is in the given Group.
The activity in this example is restricted if a student is not part of a Group Alpha:
RESTRICTING BASED ON ACTIVITY COMPLETION
External tools may need to be restricted based on completion of a prior assignment. For instance, maybe an assignment should only be visible after a tutorial is completed.
In order for a restriction to be added this way, completion conditions must be enabled on a given activity. See the "Setting Activity Completion on a Moodle Activity" article for instructions.
To add the restriction:
- In the Restrict access box, click the Add restriction button.
- In the Add restriction... pop-up window, click the Activity completion button.
An option will appear in the Access restrictions tool, with two statements:
- Student must match the following
- Specifies the condition for any restrictions.
- Activity completion Choose... must be marked complete
- The first drop-down menu specifies the activity this restriction will check for completion.
- The second drop-down menu can be set to check for different states of completion, such as must be complete with a pass grade.
To set the activity completion restriction:
- Click the drop-down menu with Choose....
- Select the activity that should be checked for completion from the list.
- Click the drop-down menu with must be marked complete.
- Select the completion state that the activity should be in for a student to access this activity.
The activity in this example is restricted based on completing an activity titled External Tool Tutorial before accessing the given activity, which looks like this:
Restriction in this way is also especially useful for Gamification. See the "Overview of the Moodle Gamification Plugin" article for more details.
RESTRICTING BASED ON MOBILE APP USAGE
Some activities may need to be restricted so that they can only or cannot be accessed using the Moodle Mobile app. More details on the app can be found in the "Overview of the Moodle NC State App" article.
To add a mobile app restriction to an activity:
- In the Restrict access box, click the Add restriction button.
- In the Add restriction... pop-up window, click the Mobile app button.
An option will appear in the Access restrictions tool, with two statements:
- Student must match the following
- Specifies the condition for any restrictions.
- Mobile app Access using the Mobile app
- Specifies whether or not the student can access on either mobile or desktop.
To set the mobile app restriction, set the Mobile app field to one of the two settings:
- Access using the Mobile app
- Students will only be able to access the given activity using the mobile app.
- Access NOT using the Mobile app
- Students will only be able to access the given activity without using the mobile app.
This restriction can be useful for ensuring that students don't attempt to access an activity unsupported by the mobile app, such as an external tool or advanced activity type.
Additional Resources
Setting Activity Completion on a Moodle Activity (DELTA Knowledge Base)
Restrict access settings (MoodleDocs)
Activity completion (MoodleDocs)
For additional assistance, please contact the LearnTech Help Desk at learntech@ncsu.edu or (919) 513-7094, or via the Get Help form on the DELTA Knowledge Base.