If a course doesn't have material with copyright issues, some faculty prefer to open the course to guests. A guest is anyone in the world with Internet access. Instructions for turning on Guest Access can be found here: How do I make my course available to students or guests?
In some cases, it is desirable to hide certain resources or activities from Guests. One possible way to restrict access by Guests is by putting registered students in a group and limiting access to only that group. Instructions for this method can be found here: How do I restrict access to items to certain members of the course?
If the class enrollment changes frequently, it can be cumbersome to manually update the group. Another method to prevent Guests from accessing specific material in the course is to override the permissions for those items. To do this, go into editing mode and click on the item you wish to limit access to. Then click Gear Icon (top right of page) → Permissions. Under Advanced role override, select the Guest role and change the viewing permissions to Prevent. For example, when limited access to a file, you would change the View resource value to Prevent.