9.0-Updated on 2024-07-05 by Q Peiffer
8.0-Updated on 2024-06-04 by Michael Whitman
7.0-Updated on 2023-08-30 by Ethan Walgran
6.0-Updated on 2023-01-25 by Ethan Walgran
5.0-Updated on 2023-01-11 by Ethan Walgran
4.0-Updated on 2022-11-09 by Ethan Walgran
3.0-Updated on 2022-10-23 by Q Peiffer
In order to change access of an activity in a Moodle page, the instructor of the course must change the "Restrict access" options in the activity settings. This can be very useful for external tools, which have limited settings inside of Moodle. This setting can be based on the following:
- Activity completion
- Time and date
- Grades
- Groups and Groupings
- User profile fields
Multiple restrictions can be applied at once, and there is also an option to apply nesting for more advanced logic.
This article provides several examples for working with the "Restrict access" settings.
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.
From The Main Course Page
- In the top-right corner of the screen, enable "Edit mode".
- Next to the activity's name, select the three vertical dots.
- In the pop-up menu that appears, select "Edit settings".
- Scroll down to the header labeled "Restrict access", and expand it.
From the Activity Page
- In the Activity's page, in the top row of headers, select "Settings".
- Scroll down to the header labeled "Restrict access", and expand it.
Using Restrict Access
In order to add a restriction, select the "Add restriction" button.
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 at 8:00AM, and September 15th at 11:55PM.
For the open time, select "Add restriction...", and select the Date button from the menu that appears. An option will appear in the Access restrictions tool, with two statements:
- Student "must" match the following
- Date "from 13 September 2022 00:00"
The first statement specifies the condition for all access restriction. When the first statement is set to "must", it says that all conditions in the box must be true in order for students to access the activity. This can be changed to "must not", meaning that all the conditions must be false in order for students to access the activity.
The second statement specifies a time and date that the activity will become available. By default, it is set to the current day at 00:00, the very start of the day at 12:00AM. In this example, change the time to 08:00, or 8:00AM.
For the close time, select "Add restriction", and then select the Date button again. A new condition appears:
- Student "must" match the following
- Date "from 13 September 2022 00:00"
If access needs to be restricted after the 15th of September at 11:55PM, change the following:
- The Date "from"to Date "until"
- The day from "13" to "15"
- The time from "00:00" to "23:55" (which is 11:55PM)
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 is specifically assigned to "Group Alpha".
For specific guidance on creating groups and adding students to them, please review our Creating and Adding Users to Moodle Groups article.
To add the restriction, select "Add restriction...", and then select the Group option from the window that appears. An option will appear in the Access restrictions tool, with two statements:
- Student "must" match the following
- Group "Choose..."
Click "Choose..." and select Group Alpha from the list.
In this case, it may also be prudent to declutter the Moodle page from students not in Group Alpha. In this case, 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 Group Alpha.
The conditions should look like this:
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.
To add the restriction, select "Add restriction...", and then select the Activity Completion button from the window that appears. An option will appear in the Access restrictions tool, with two statements:
- Student "must" match the following
- Activity completion is "Choose... must be marked complete"
Select "Choose..." and, from the list, select the activity "External Tool Tutorial" (this is an example). Note, that activity completion settings will need to be enabled on the assignment chosen in order for the Restrict access settings to allow it as an option.
Press Save. The assignment is restricted until students complete the other activity. The conditions should look like this:
Restriction in this way is also especially useful for Gamification purposes.
Additional Resources
Restrict Activity Access (Moodle Doc)
Setting Activity Completion on a Moodle Activity (DELTA Knowledge Base)
Activity Completion (Moodle Doc)
Khan Academy article on conditional logic
For additional assistance please contact the LearnTech help desk at [email protected] or (919) 513-7094, or via the "Get Help" tab above.