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

recaptcha element is missng the red star as mandatory field

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Reopened
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.9.5, 2.8.1
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_28_STABLE

      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

              Assignee:
              Unassigned
              Reporter:
              daniss Daniele Cordella
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: