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

multiple select dependencies in forms not working anymore

    XMLWordPrintable

Details

    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • Hide
      • Get the testing form @ http://pastebin.com/SMLHCMd4 and save it somewhere (test.php) in moodle main directory.
      • Go to the browser, enable console and point to the testing form (test.php).
      • Verify that there isn't any error in the console along the process, specially about "undefined is not an object (evaluating selected.length)"
      • Verify that, if you select "South" and "West" (multiple), then the "enter your name" field is enabled.
      • Selecting every other combination, the field "enter your name" is disabled.

      And that's all, apparently there isn't any use in core so we cannot introduce any test based on it.

      Show
      Get the testing form @ http://pastebin.com/SMLHCMd4 and save it somewhere (test.php) in moodle main directory. Go to the browser, enable console and point to the testing form (test.php). Verify that there isn't any error in the console along the process, specially about "undefined is not an object (evaluating selected.length)" Verify that, if you select "South" and "West" (multiple), then the "enter your name" field is enabled. Selecting every other combination, the field "enter your name" is disabled. And that's all, apparently there isn't any use in core so we cannot introduce any test based on it.

    Description

      It seems that MDL-54778 did introduce a regression when defining dependencies, at least for multiple select elements.

      Forms that were working perfectly in v.3.1.0 do not work anymore in v3.1.1 (I assume the same happens with 30_STABLE and master).

      Here it's the bisect session: http://pastebin.com/aJbxLRf7
      And here it's the testing form, now failing: http://pastebin.com/Ech4n9Ww

      Ciao

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Andrew Lyons Andrew Lyons
              David Monllaó David Monllaó
              Adrian Greeve Adrian Greeve
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Nov/16