--- title: Moodle description: Install the CaptchaLa Moodle plugin to protect the login, self-registration and forgotten password forms. --- # Moodle Official CaptchaLa plugin for Moodle. It adds CAPTCHA verification to the login form, the self-registration form and the forgotten password form, without writing code. Every widget is backed by a **server-issued, single-use token**, and each submission is checked on your server before Moodle acts on the form. ## What it covers | Form | Action | Notes | | --- | --- | --- | | Login | `login` | Needs the CaptchaLa authentication method enabled (see [Configure](#configure)). A failed check shows a message on the form and the user is not logged in. | | Self-registration (`/login/signup.php`) | `register` | Works with whichever self-registration method is used. | | Forgotten password (`/login/forgot_password.php`) | `lost_password` | | All three are on by default and can be turned off one by one. ## Requirements - Moodle 4.4 to 5.3 - A CaptchaLa account — get your **App Key** + **App Secret** at [`dash.captcha.la`](https://dash.captcha.la) - The Moodle server can make outgoing HTTPS requests (Moodle's proxy settings apply) ## Install 1. Use **Code → Download ZIP** on the [GitHub repository](https://github.com/Captcha-La/captchala-moodle). It installs as is and already includes the PHP SDK. 2. Go to **Site administration → Plugins → Install plugins**, drop the ZIP on the upload box and run the installer. ## Configure Open **Site administration → Plugins → Authentication → CaptchaLa**: 1. Paste your **App Key** and **App Secret**. 2. Choose a **Widget mode** and **Language**. 3. Pick the **Protected forms**. 4. Click **Test connection**, then **Save changes**. To protect the login form, also enable **CaptchaLa** under **Site administration → Plugins → Authentication → Manage authentication**. It does not log anyone in itself; it only checks the CAPTCHA before Moodle checks the password. | Setting | Default | Description | | --- | --- | --- | | App key | — | Public key from the CaptchaLa dashboard. Required. | | App secret | — | Server secret, used to issue and validate tokens. Required; never sent to the browser. | | Widget mode | Bind to submit button | `bind` (the check runs when the visitor presses the form's submit button), inline `embed`, `popup` or `float`. | | Language | `auto` | BCP-47 tag such as `ja` or `pt-BR`, or `auto` to use the language the Moodle page is shown in. | | Login form | on | Protect the login form. | | Self-registration form | on | Protect the self-registration form. | | Forgotten password form | on | Protect the forgotten password form. | ## Screenshots ![CaptchaLa settings in Moodle: App Key, App Secret, widget mode and language](/images/plugins/moodle/admin-settings.webp) ![Protected forms and the Test connection button in the CaptchaLa settings](/images/plugins/moodle/protected-forms.webp) ![Moodle login form with the CaptchaLa bar showing Verified](/images/plugins/moodle/login-form.webp) ![Moodle self-registration form with the CaptchaLa bar](/images/plugins/moodle/signup-form.webp) ## Test keys Public test keys work without an account and are never billed: | Behaviour | App key | App secret | | --- | --- | --- | | Always pass | `test_pass_7f3c9a2e5b18d4f6` | `test_secret_pass_c41e8b0d27a95f3e` | | Always fail | `test_fail_2d9e6b4a0c7f1835` | `test_secret_fail_9b5f03e7d1a46c28` | ## Notes - **Moodle's own reCAPTCHA.** If Moodle's built-in reCAPTCHA is on for a form, CaptchaLa is not added to that form; the settings page shows which forms are affected. Turn reCAPTCHA off for a form to use CaptchaLa on it. - **Not covered:** `login/token.php` (mobile app and web service token login) and other sign-in entry points that do not use the login form. - **Privacy.** The plugin has no database tables and stores nothing about users in Moodle. Moodle sends CaptchaLa no user name, email address, user ID or IP address; this is declared to Moodle's privacy API. ## Troubleshooting - **The widget does not appear on the login page.** Check that the CaptchaLa method is enabled under **Manage authentication**, that **Test connection** succeeds, and that Moodle's reCAPTCHA is off for that form. - **Every submission is refused.** Make sure the App Key and App Secret belong to the same app, and that your site's domain is allowed for that app in the dashboard. - **Locked out of the login form** (for example after saving wrong keys): turn login protection off from the Moodle directory, as the web server user: ```bash php admin/cli/cfg.php --component=auth_captchala --name=protect_login --set=0 ``` ## Links - Source and issues: [github.com/Captcha-La/captchala-moodle](https://github.com/Captcha-La/captchala-moodle) - Support: [supply@captcha.la](mailto:supply@captcha.la)