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

Using AJAX to move resources in course edit mode yields unexpected results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.3.2
    • Fix Version/s: STABLE backlog
    • Component/s: Course, JavaScript
    • Labels:
    • Environment:
      This doesn't seem to be related to the server environment, as no errors whatsoever are logged on the server side.
    • Testing Instructions:
      Hide

      When one is dragging a resource, a "ghost" of the resource follows the pointer, indicating (I guess) where the resource would be moved to if the user releases the mouse button. However, if one releases the mouse button when the item (hooked to the mouse pointer) is too far from its ghost, the item pops into position where the ghost was, but the resource is not actually moved (as proved by a page reload).

      To reproduce this:

      • click and hold the resource handle to initiate the item move
      • holding the mouse button, move the resource around and observe the following ghost : the item hooked to the mouse moves with the mouse, whereas the ghost only pops in possible destinations
      • if the mouse button is released when the hooked item is too far from the ghost, the item pops in place where the ghost was, but is not actually moved.
      Show
      When one is dragging a resource, a "ghost" of the resource follows the pointer, indicating (I guess) where the resource would be moved to if the user releases the mouse button. However, if one releases the mouse button when the item (hooked to the mouse pointer) is too far from its ghost, the item pops into position where the ghost was, but the resource is not actually moved (as proved by a page reload). To reproduce this: click and hold the resource handle to initiate the item move holding the mouse button, move the resource around and observe the following ghost : the item hooked to the mouse moves with the mouse, whereas the ghost only pops in possible destinations if the mouse button is released when the hooked item is too far from the ghost, the item pops in place where the ghost was, but is not actually moved.
    • Workaround:
      Hide

      To obtain the desired effect, one has to drop the item close enough to the ghost. Then the item pops in place of its ghost. The only visible difference with the undesirable behavior (expected the result after a full page reload) is that the mini AJAX animated GIF doesn't display.

      Show
      To obtain the desired effect, one has to drop the item close enough to the ghost. Then the item pops in place of its ghost. The only visible difference with the undesirable behavior (expected the result after a full page reload) is that the mini AJAX animated GIF doesn't display.
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      On the course layout page, when in edit mode, the following unexpected behavior occurs (this has been tested reproducibly on Firefox 16 for Mac and Windows): depending on where exactly the moved resource is dropped, one of the following three things happen:

      • the resource is actually moved to the correct destination
      • the resource is not moved to destination, but pops back into its original position
      • the resource appears at the correct destination, but its new position is not recorded in the DB.
        While 1) and 2) are OK to us (visual feedback accurately hints to what happened), 3) is the source of much frustration.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: