Moodle 2.4.1+ and reCAPTCHA V2 not working

Moodle 2.4.1+ and reCAPTCHA V2 not working

by Gina Gwen -
Number of replies: 1

I followed the steps to create and update my Site Key and Secret Key in Moodle to update to reCAPTCHA v2. But the same error appears on my "Create New Account" page.  I read that I don't need to do these two extra steps, but perhaps I do?

Paste this snippet before the closing </head> tag on your HTML template:   <script src='https://www.google.com/recaptcha/api.js'></script>;

Paste this snippet at the end of the <form> where you want the reCAPTCHA widget to appear:   <div class="g-recaptcha" data-sitekey="6LcCw1gUAAAAAMMh4aV3x0MWFe0NEJb_uAmOGo2h"></div>

From what I am reading, it looks like my version of Moodle may be too old?
Moodle 2.4.1+ (Build: 20130125)

I am trying to avoid updating for several reasons...does anyone know a work around that I could do instead? 


Average of ratings: -
In reply to Gina Gwen

Re: Moodle 2.4.1+ and reCAPTCHA V2 not working

by Nitesh Kumar -

Hi Gina,

In which file you have added "div class="g-recaptcha" data-sitekey="6LcCw1gUAAAAAMMh4aV3x0MWFe0NEJb_uAmOGo2h"></div>" this code ?

I think It should be added on this file

https://github.com/moodle/moodle/blob/MOODLE_24_STABLE/login/signup_form.php


Please try to add this in moodle format and also check that api.js is including on page or not by view page source.

Thanks