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

multiple select dependencies in forms not working anymore

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      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

              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Nov/16