Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20285

recaptcha element is missng the red star as mandatory field

    XMLWordPrintable

Details

    • Improvement
    • Status: Reopened
    • Trivial
    • Resolution: Unresolved
    • 1.9.5, 2.8.1
    • None
    • Forms Library
    • MOODLE_19_STABLE, MOODLE_28_STABLE
    • Easy

    Description

      if mform recaptcha element is included in a form it is always mandatory.
      Because of this a red star should be added to it wherever the recaptcha element appears.

      For instance, in moodle19/login/signup_form.php
      it is written:
      $mform->addElement('recaptcha', 'recaptcha_element', get_string('recaptcha', 'auth'), array('https' => $CFG->loginhttps));
      $mform->setHelpButton('recaptcha_element', array('recaptcha', get_string('recaptcha', 'auth')));
      but maybe it should be better:
      $mform->addElement('recaptcha', 'recaptcha_element', get_string('recaptcha', 'auth'), array('https' => $CFG->loginhttps));
      $mform->setHelpButton('recaptcha_element', array('recaptcha', get_string('recaptcha', 'auth')));
      $mform->addRule('recaptcha_element', get_string('missing_recaptchaelement'), 'required', null, 'server');

      or, better, the recaptcha element should always be provided by moodle libraries equipped with the red star, with no care for the calling function!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daniss Daniele Cordella
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: