Valid for Moodle 2.8. Updated on 4/4/2016.
- In the Administration block on the left, in the Course administration section, click on the Edit settings link.
- On the course settings page, scroll down to the Guest Access section. For the Allow guest access item, select No from the pull-down menu.
- Scroll down and click on Save Changes.
By default, courses are built with guest access turned off.
If you set guest access to Yes you can then attach a password. Only guest with the password will be allowed access.