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

moodle-core-dialogue overwrites supplied configuration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6.1
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide
      • Try opening a variety of Moodle dialogues, including:
        • backup/restore cancellation confirmation;
        • activity chooser
        • file picker
        • enrol dialogue
        • keyboard move
      • open each, then close it, and open it a few more times.
        • Confirm that it appears the same each time**

      The place I noticed this was the backup/restore cancellation with the location being confused on subsequent loads.

      Show
      Try opening a variety of Moodle dialogues, including: backup/restore cancellation confirmation; activity chooser file picker enrol dialogue keyboard move open each, then close it, and open it a few more times. Confirm that it appears the same each time** The place I noticed this was the backup/restore cancellation with the location being confused on subsequent loads.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-43234-master

      Description

      As seen with the backup confirmcancel dialogue. If you first choose to stay, and then re-open it, the dialogue is display off screen.

      This turns out to be because the configuration is passed by reference, and we then modify the values - e.g.:

          config.center =     config.centered && true;
          config.centered =   false;
      

      This means that:

      • the first time that the dialogue is displayed, it will be follow the value of config.centered;
      • then config.centered is set to false;
      • any subsequent time it is called, config.centered is now false, therefore config.center is also false

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Petr Skoda
              Integrator:
              Sam Hemelryk
              Tester:
              Andrew Davis
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/14