Moodle
  1. Moodle
  2. MDL-34728

Other JavaScript cannot get a form to update the disabledIf state of the form elements.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2.4, 2.3.1
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Forms Library
    • Labels:

      Description

      This was found while working on MDL-32705. After the user clicks on Select all/none in the backup UI, we need to update which controls are disabled, but it is impossible to do that.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Tim Hunt added a comment -

            Eloy was insistent that this be fixed before MDL-32705 was integrated, so I did it myself.

            This is far from being the most elegant code in the world, but it is simple and it works. Please could I have a peer review, Sam. Thanks.

            Show
            Tim Hunt added a comment - Eloy was insistent that this be fixed before MDL-32705 was integrated, so I did it myself. This is far from being the most elegant code in the world, but it is simple and it works. Please could I have a peer review, Sam. Thanks.
            Hide
            Sam Hemelryk added a comment -

            Code looks spot on thanks Tim, passing null through checkDependencies caught my eye but I guess that is as good as any other option when an event is not the trigger.
            Gets a +1 from me.

            Thanks
            Sam

            Show
            Sam Hemelryk added a comment - Code looks spot on thanks Tim, passing null through checkDependencies caught my eye but I guess that is as good as any other option when an event is not the trigger. Gets a +1 from me. Thanks Sam
            Hide
            Tim Hunt added a comment -

            Thanks for the review Sam. Submitting for integration now.

            Show
            Tim Hunt added a comment - Thanks for the review Sam. Submitting for integration now.
            Hide
            Dan Poltawski added a comment -

            I've integrated this now - 22, 23 and master.

            Thanks Tim.

            Show
            Dan Poltawski added a comment - I've integrated this now - 22, 23 and master. Thanks Tim.
            Hide
            Rajesh Taneja added a comment -

            Thanks for fixing this bug, Tim.

            Works Great.

            FYI:
            Cherry-picked patch from MDL-32705 to test this. Realised one more bug on schema page (not related).

            Going back and forth between initial and schema page with change in "Include activities" selection doesn't respect it.
            Steps to reproduce:

            1. Select "Include activities" on initial settings page
            2. press next, you will observe all the activities having a checkbox.
            3. Press previous and uncheck "Include activities" and then press next
            4. This time you should see "X" and no checkboxes next to activities
            5. Press previous again and check "Include activities" and then press next again
            6. Same "X" is observed, it should be checkboxes (next to activities)
            Show
            Rajesh Taneja added a comment - Thanks for fixing this bug, Tim. Works Great. FYI: Cherry-picked patch from MDL-32705 to test this. Realised one more bug on schema page (not related). Going back and forth between initial and schema page with change in "Include activities" selection doesn't respect it. Steps to reproduce: Select "Include activities" on initial settings page press next, you will observe all the activities having a checkbox. Press previous and uncheck "Include activities" and then press next This time you should see "X" and no checkboxes next to activities Press previous again and check "Include activities" and then press next again Same "X" is observed, it should be checkboxes (next to activities)
            Hide
            Tim Hunt added a comment -

            Rajesh, that is a bug with the backup system. You need to create another MDL for that. It's nothing to do with me gov.

            Show
            Tim Hunt added a comment - Rajesh, that is a bug with the backup system. You need to create another MDL for that. It's nothing to do with me gov.
            Hide
            Rajesh Taneja added a comment -

            I agree Tim, have created MDL-34911.

            Show
            Rajesh Taneja added a comment - I agree Tim, have created MDL-34911 .
            Hide
            Eloy Lafuente (stronk7) added a comment -

            For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility!

            Many thanks for your collaboration, yay!

            Closing, ciao

            Show
            Eloy Lafuente (stronk7) added a comment - For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility! Many thanks for your collaboration, yay! Closing, ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: