Moodle
  1. Moodle
  2. MDL-35767

drag and drop code seems to assume that every dragged thing has .commands

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.3.3
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Open the course and turn editing on
      2. Move one of the resources to the new place
      3. Click on "Add the activity or resource"
      4. Try moving the overlay window around the screen by dragging it.
      5. Step above should not cause JS errors.
      Show
      Open the course and turn editing on Move one of the resources to the new place Click on "Add the activity or resource" Try moving the overlay window around the screen by dragging it. Step above should not cause JS errors.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-35767-master

      Description

      David Monllaó discovered a problem when testing latest 3.7.2 in MDL-35616, but imo this does not seem to be specific to this new version:
      "After moving an activity or a course section (AJAX), if you open an activity chooser and you drag & drop it a JS error is thrown and there is no way to stop moving the modchooser around, I can not reproduce the problem in latest weekly 2.4." (I managed to reproduce it in latest weekly, but also 2.3.x --skodak)

      drag and drop code seems to assume that every dragged thing has .commands,
      /course/yui/dragdrop/dragdrop.js does

      var spinner = M.util.add_spinner(Y, dragnode.one(CSS.COMMANDSPAN));

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Petr Skoda added a comment -

            Hi Ruslan, could you please diagnose this problem?

            Show
            Petr Skoda added a comment - Hi Ruslan, could you please diagnose this problem?
            Hide
            Petr Skoda added a comment -

            David Monllaó commented on MDL-35616:
            -------------------------------------

            Owwww, I was on holidays since Friday and my stable versions were outdated (Thu Sep 20 versions) I've been able to reproduce the problem on the latest weekly versions; going a bit deeper the modchooser error seems a regression of MDL-34328, to be more concrete https://github.com/moodle/moodle/commit/cffbc80ac70501098b0fe82efe182e506f77630d#lib/yui/dragdrop

            Show
            Petr Skoda added a comment - David Monllaó commented on MDL-35616 : ------------------------------------- Owwww, I was on holidays since Friday and my stable versions were outdated (Thu Sep 20 versions) I've been able to reproduce the problem on the latest weekly versions; going a bit deeper the modchooser error seems a regression of MDL-34328 , to be more concrete https://github.com/moodle/moodle/commit/cffbc80ac70501098b0fe82efe182e506f77630d#lib/yui/dragdrop
            Hide
            Dan Poltawski added a comment -

            Hi Ruslan,

            Just to let you know that we're going to be watching this issue carefully, if the solution is not an easy fix in the next hours, then we'll aim to revert the changes made in MDL-34328 in order to ensure this regression from that issue doens't remain affecting stable users.

            Show
            Dan Poltawski added a comment - Hi Ruslan, Just to let you know that we're going to be watching this issue carefully, if the solution is not an easy fix in the next hours, then we'll aim to revert the changes made in MDL-34328 in order to ensure this regression from that issue doens't remain affecting stable users.
            Hide
            Ruslan Kabalin added a comment -

            Hi Dan, I am working on solution right now.

            Show
            Ruslan Kabalin added a comment - Hi Dan, I am working on solution right now.
            Hide
            Ruslan Kabalin added a comment - - edited

            Appeared to be a mix of regressions, one mentioned above, another one MDL-33588 (371409f on master). Drag object group check was missing. Patch for master and 2.3 stable is attached.

            Show
            Ruslan Kabalin added a comment - - edited Appeared to be a mix of regressions, one mentioned above, another one MDL-33588 (371409f on master). Drag object group check was missing. Patch for master and 2.3 stable is attached.
            Hide
            Dan Poltawski added a comment -

            Thanks Ruslan, i've integrated this now.

            Show
            Dan Poltawski added a comment - Thanks Ruslan, i've integrated this now.
            Hide
            Dan Poltawski added a comment -

            Tested during integration and looks good.

            Many thanks for the prompt fix Ruslan.

            Show
            Dan Poltawski added a comment - Tested during integration and looks good. Many thanks for the prompt fix Ruslan.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Closing as fixed, many thanks for your awesome collaboration.

            Show
            Eloy Lafuente (stronk7) added a comment - Closing as fixed, many thanks for your awesome collaboration.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: