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

moodleform_mod overwrites errors from moodleform

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.11.10, 4.0.4
    • 3.11.11, 4.0.5
    • Forms Library

    Description

      In moodleform_mod::validation(), the parent::validation() call is made to allow the parent class (moodleform) to perform validation steps that may need to happen globally. However, two instructions later in the function, the errors array that was returned is immediately overwritten with an empty array.

      This has been a problem since Moodle 2.0, but it doesn't cause any problems at this moment. However, fixing the issue now avoids future surprises.

      Attachments

        1. MDL-75836_master.png
          MDL-75836_master.png
          22 kB
        2. MDL-75836_v311.png
          MDL-75836_v311.png
          23 kB
        3. MDL-75836_v400.png
          MDL-75836_v400.png
          22 kB

        Issue Links

          Activity

            People

              jrchamp Jonathan Champ
              jrchamp Jonathan Champ
              Paul Holden Paul Holden
              Andrew Lyons Andrew Lyons
              John Edward Pedregosa John Edward Pedregosa
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Nov/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 11 minutes
                  2h 11m