Skip to content

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 ​

FormActionNotes
LoginloginNeeds the CaptchaLa authentication method enabled (see Configure). A failed check shows a message on the form and the user is not logged in.
Self-registration (/login/signup.php)registerWorks 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
  • The Moodle server can make outgoing HTTPS requests (Moodle's proxy settings apply)

Install ​

  1. Use Code → Download ZIP on the GitHub repository. 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.

SettingDefaultDescription
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 modeBind to submit buttonbind (the check runs when the visitor presses the form's submit button), inline embed, popup or float.
LanguageautoBCP-47 tag such as ja or pt-BR, or auto to use the language the Moodle page is shown in.
Login formonProtect the login form.
Self-registration formonProtect the self-registration form.
Forgotten password formonProtect the forgotten password form.

Screenshots ​

CaptchaLa settings in Moodle: App Key, App Secret, widget mode and language

Protected forms and the Test connection button in the CaptchaLa settings

Moodle login form with the CaptchaLa bar showing Verified

Moodle self-registration form with the CaptchaLa bar

Test keys ​

Public test keys work without an account and are never billed:

BehaviourApp keyApp secret
Always passtest_pass_7f3c9a2e5b18d4f6test_secret_pass_c41e8b0d27a95f3e
Always failtest_fail_2d9e6b4a0c7f1835test_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

MIT-licensed examples · CaptchaLa is operated independently