Skip to Content

How to Prevent Moodle Visitors from Getting Automatically Connected Anonymously

Learn how to prevent Moodle visitors from getting automatically connected anonymously, and how to configure the guest access settings in Moodle.

Moodle is a popular learning management system (LMS) that allows educators and learners to create and access online courses and activities. Moodle supports various types of users, such as administrators, teachers, students, and guests. Guests are users who can view the courses and activities without logging in or enrolling. However, some Moodle administrators may not want to allow guests to access their site, or may want to restrict the guest access to certain courses or activities. In this article, we will explain how to prevent Moodle visitors from getting automatically connected anonymously, and how to configure the guest access settings in Moodle.

How to prevent Moodle visitors from getting automatically connected anonymously?

By default, Moodle allows visitors to access the site as guests, without logging in or enrolling. This means that visitors can view the courses and activities that are available for guest access, but they cannot participate or interact with them. However, some Moodle administrators may want to disable the guest access, or require the visitors to log in or enroll before accessing the site. To prevent Moodle visitors from getting automatically connected anonymously, you can use the following steps:

  1. Log in to your Moodle site as an administrator, and go to Site administration > Plugins > Authentication > Manage authentication.
  2. Find the Guest login button setting, and set it to Hide. This will hide the guest login button from the login page, and prevent the visitors from accessing the site as guests. Find the Guest login button setting, and set it to Hide. This will hide the guest login button from the login page, and prevent the visitors from accessing the site as guests.
  3. Find the Auto-login guests setting, and set it to No. This will disable the automatic guest login, and require the visitors to log in or enroll before accessing the site. Find the Auto-login guests setting, and set it to No. This will disable the automatic guest login, and require the visitors to log in or enroll before accessing the site.
  4. Click the Save changes button at the bottom of the page.

How to configure the guest access settings in Moodle?

If you want to allow guests to access your Moodle site, but with some restrictions or conditions, you can configure the guest access settings in Moodle. The guest access settings allow you to:

  • Enable or disable the guest access for the whole site, or for specific courses or activities
  • Set a guest access password, or a guest access key, for the whole site, or for specific courses or activities
  • Set the guest access duration, or the guest access expiry, for the whole site, or for specific courses or activities
  • Set the guest access permissions, or the guest access capabilities, for the whole site, or for specific courses or activities

To configure the guest access settings in Moodle, you can use the following steps:

  1. Log in to your Moodle site as an administrator, and go to Site administration > Plugins > Authentication > Manage authentication.
  2. Find the Guest accounts setting, and click the Settings link. This will open the Guest accounts settings page, where you can configure the guest access settings for the whole site.
  3. On the Guest accounts settings page, you can enable or disable the guest access by checking or unchecking the Enable guest access box. You can also set a guest access password by entering it in the Password box. You can also set the guest access duration by entering the number of days in the Guest access duration box. You can also set the guest access expiry by entering the date and time in the Guest access expiry box. You can also set the guest access permissions by clicking the Permissions link, and adjusting the guest access capabilities. You can also set the guest access key by clicking the Add key link, and entering the key name and value.
  4. Click the Save changes button at the bottom of the page.
  5. If you want to configure the guest access settings for specific courses or activities, you can go to the course or activity page, and click the Edit settings link. This will open the course or activity settings page, where you can find the Guest access section. You can configure the guest access settings for the course or activity in the same way as for the whole site.

Frequently Asked Questions (FAQs)

Question: How do I enable or disable the guest access for a specific course or activity in Moodle?

Answer: To enable or disable the guest access for a specific course or activity in Moodle, you can go to the course or activity page, and click the Edit settings link. This will open the course or activity settings page, where you can find the Guest access section. You can enable or disable the guest access by selecting Yes or No from the Allow guest access dropdown menu. You can also configure the other guest access settings, such as the guest access password, the guest access key, the guest access duration, the guest access expiry, and the guest access permissions.

Question: How do I view the guest access logs in Moodle?

Answer: To view the guest access logs in Moodle, you can go to Site administration > Reports > Logs. This will open the Logs page, where you can filter the logs by various criteria, such as the date, the course, the activity, the user, the action, and the level. You can select Guest user from the User dropdown menu, and Guest access from the Action dropdown menu, to view the guest access logs. You can also export the logs to various formats, such as CSV, Excel, ODS, or HTML.

Question: How do I change the guest access role in Moodle?

Answer: The guest access role in Moodle is a predefined role that defines the capabilities and permissions of the guests. By default, the guest access role allows the guests to view the courses and activities, but not to participate or interact with them. However, you can change the guest access role in Moodle, if you want to customize the guest access capabilities. To change the guest access role in Moodle, you can go to Site administration > Users > Permissions > Define roles. This will open the Define roles page, where you can find the Guest role. You can click the Edit icon next to the Guest role, and modify the guest access capabilities. You can also create a new role for the guest access, and assign it to the guests.