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

Dropping sections does not complete

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-68231-master
    • Hide
      1. Create a course in topics format and make sure there are at least 4 sections
      2. On the course home, turn editing on and move (via drag handle) section 4 onto section 3
      3. Verify the operation completes without any js console errors.
      4. Repeat the above for weeks format course
      5. Now, via user prefs -> course prefs, disable the activity chooser (deselect check box and save)
      6. Go back to the course home
      7. Verify you have select menus instead of the 'Add an activity or resource' link
      8. Repeat the drag and drop testing in steps 2 and 3 for both weeks and topics format, Verifying that there are no console errors and that the sections can be moved.
      Show
      Create a course in topics format and make sure there are at least 4 sections On the course home, turn editing on and move (via drag handle) section 4 onto section 3 Verify the operation completes without any js console errors. Repeat the above for weeks format course Now, via user prefs -> course prefs, disable the activity chooser (deselect check box and save) Go back to the course home Verify you have select menus instead of the 'Add an activity or resource' link Repeat the drag and drop testing in steps 2 and 3 for both weeks and topics format, Verifying that there are no console errors and that the sections can be moved.
    • 1

    Description

      When you drop a section in the Weeks or Topics course format the wait selector stays on

      The following JS errors appear:

      Uncaught TypeError: Cannot read property 'swap' of null
          at Object.M.course.format.swap_sections (format.js:2)
          at DRAGSECTION.success (yui_combo.php?m/1584976196/course/coursebase/coursebase-debug.js&m/1584976196/course/util/util-base-debug.js&m/1584976196/course/util/util-section-debug.js&m/1584976196/course/util/util-cm-debug.js&m/1584976196/course/dragdrop/dragdrop-debug.js:655)
          at Y.Subscriber._notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13680)
          at Y.Subscriber.notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13709)
          at Y.CustomEvent._notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13372)
          at Y.CustomEvent._procSubs (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13498)
          at Y.CustomEvent.fireSimple (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13465)
          at Y.CustomEvent._fire (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13447)
          at IO.fire (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:14600)
          at IO._evt (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:23686)
      

      It appears to be caused because the non-ajax activity chooser is no longer always present on the page.

      The script is looking for an element with the section_add_menus class inside the sections.

      Attachments

        Issue Links

          Activity

            People

              jaked Jake Dallimore
              nmagill Neill Magill
              Adrian Greeve Adrian Greeve
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Janelle Barcega Janelle Barcega
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/Jun/20

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 5 minutes
                  2h 5m