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

When closing the "Enrol users" dialogue, the page jumps to the bottom button

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.2.6, 3.3.3
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide
      master only
      1. Login as a teacher enrolled in a course C1.
      2. Go to C1's course participants page.
      3. Click on the top "Enrol users" button.
        • Confirm that the quick enrolment modal comes up.
      4. Hit escape.
        • Confirm that the quick enrolment modal closes.
        • Confirm that the top "Enrol users" button gets focused.
      5. Do the same thing for the lower "Enrol users" button, but this time, confirm that the lower "Enrol users" button gets focused after the quick enrolment modal closes.
      33 and 32

      There seems to be no instances in stables where this issue occurs, so let's improvise.

      1. Edit "lib/navigation.lib" and paste the following code after this line:

                    $addablock = navigation_node::create(get_string('addblock') . " 2", $url);
                    $flat = new flat_navigation_node($addablock, 0);
                    $flat->key = 'addblock';
                    $this->add($flat);
                    $addablock = navigation_node::create(get_string('addblock') . " 3", $url);
                    $flat = new flat_navigation_node($addablock, 0);
                    $flat->key = 'addblock';
                    $this->add($flat);
        

      2. Save the file.
      3. Purge caches (just to be safe)
      4. Login as a user and go to the Dashboard.
      5. Click on "Customise this page"
      6. You will now see 3 "Add a block" items on the flat navigation panel. Ignore the debugging messages (if you see them)
      7. Click on the first "Add a block" item.
      8. After the "Add a block" modal comes up, hit escape.
        • Confirm that after the modal closes, the first "Add a block" item gets the focus.
      9. Repeat for the other "Add a block" items.
        • Confirm that the item that got clicked gets the focus after the modal closes.
      Show
      master only Login as a teacher enrolled in a course C1. Go to C1's course participants page. Click on the top "Enrol users" button. Confirm that the quick enrolment modal comes up. Hit escape. Confirm that the quick enrolment modal closes. Confirm that the top "Enrol users" button gets focused. Do the same thing for the lower "Enrol users" button, but this time, confirm that the lower "Enrol users" button gets focused after the quick enrolment modal closes. 33 and 32 There seems to be no instances in stables where this issue occurs, so let's improvise. Edit " lib/navigation.lib " and paste the following code after this line : $addablock = navigation_node::create(get_string('addblock') . " 2", $url); $flat = new flat_navigation_node($addablock, 0); $flat->key = 'addblock'; $this->add($flat); $addablock = navigation_node::create(get_string('addblock') . " 3", $url); $flat = new flat_navigation_node($addablock, 0); $flat->key = 'addblock'; $this->add($flat); Save the file. Purge caches (just to be safe) Login as a user and go to the Dashboard. Click on " Customise this page " You will now see 3 "Add a block" items on the flat navigation panel. Ignore the debugging messages (if you see them) Click on the first "Add a block" item. After the " Add a block " modal comes up, hit escape. Confirm that after the modal closes, the first " Add a block " item gets the focus. Repeat for the other " Add a block " items. Confirm that the item that got clicked gets the focus after the modal closes.
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-59858-master

      Description

      Directions
      1. Open the participants page
      2. Press the Enrol users button at the top of the page
      3. Hit escape
      Expected result

      The dialogue should close and the previous button clicked highlighted.

      Actual result

      The dialogue closes, but the page jumps to the button at the bottom of the page which is highlighted instead.

        Attachments

          Activity

            People

            Assignee:
            jpataleta Jun Pataleta
            Reporter:
            dobedobedoh Andrew Nicols
            Peer reviewer:
            Mark Nelson
            Integrator:
            Damyon Wiese
            Tester:
            Ankit Agarwal
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Nov/17