This site requires JavaScript to be enabled
An updated version of this article is available

Using Access Restrictions for Activities in Moodle

52521 views

14.0 - Updated on 2025-08-19 by Sarah Weatherman

13.0 - Updated on 2025-07-16 by Q Peiffer

12.0 - Updated on 2025-04-27 by Grace Hatterschide

11.0 - Updated on 2025-04-24 by Q Peiffer

10.0 - Updated on 2024-10-01 by Q Peiffer

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

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:

  1. Navigate to a given activity.
  2. In the activity menu at the top of the page, select the Settings tab.
  3. 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:

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:

  1. In the Restrict access box, click the Add restriction button.
  2. In the Add restriction... pop-up window, click the Date button.

An option will appear in the Access restrictions tool, with two statements:

To change the date and time to Sept. 13th, 2022 at 08:00, or 8:00AM:

  1. In the drop-down menu that specifies the current day, select 22 from the list.
  2. In the menu for the month, select September.
  3. In the menu for the year, select 2022.
  4. 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:

  1. In the Restrict access box, click the Add restriction button.
  2. In the Add restriction... pop-up window, click the Date button.
  3. In the drop-down menu that specifies From, select the Until option from the list.
  4. In the menu for the day, select 15.
  5. In the menu for the month, select September.
  6. In the menu for the year, select 2022.
  7. In the menu for the hours, select 23.
  8. 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:

  1. In the Restrict access box, click the Add restriction button.
  2. In the Add restriction... pop-up window, click the Group button.

 An option will appear in the Access restrictions tool, with two statements:

To set the appropriate group:

  1. Click the drop-down menu for Choose....
  2. 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:

  1. In the Restrict access box, click the Add restriction button.
  2. In the Add restriction... pop-up window, click the Activity completion button.

An option will appear in the Access restrictions tool, with two statements:

To set the activity completion restriction:

  1. Click the drop-down menu with Choose....
  2. Select the activity that should be checked for completion from the list.
  3. Click the drop-down menu with must be marked complete.
  4. 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:

  1. In the Restrict access box, click the Add restriction button.
  2. In the Add restriction... pop-up window, click the Mobile app button.

An option will appear in the Access restrictions tool, with two statements:

To set the mobile app restriction, set the Mobile app field to one of the two settings:

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.