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

Quiz Drag-And-Drop onto Image, Incorrect Item Positions (Firefox)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.1
    • Fix Version/s: 3.6.3
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide
      1. Restore the attached quiz into a course
      2. Start an attempt at the quiz.
        1. Verify that everything is correctly positioned in all questions.
      3. Press F5 to reload the page
        1. Verify that everything is correctly positioned in all questions.
      4. Partially answer some of the questions.
      5. Expand/collapse the Boost dock.
        1. Verify that everything is correctly positioned in all questions.
      6. Submit the quiz attempt.
      7. On the review page, expand/collapse the Boost doc.
        1. Verify that everything is correctly positioned in all questions.
      Show
      Restore the attached quiz into a course Start an attempt at the quiz. Verify that everything is correctly positioned in all questions. Press F5 to reload the page Verify that everything is correctly positioned in all questions. Partially answer some of the questions. Expand/collapse the Boost dock. Verify that everything is correctly positioned in all questions. Submit the quiz attempt. On the review page, expand/collapse the Boost doc. Verify that everything is correctly positioned in all questions.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

       Steps to reproduce

      ===============

      1. Use Firefox.
      2. Create a new quiz. Give it a name (e.g. "A Quiz"). Save and Display.
      3. Edit Quiz and Add a New Question. Choose Drag and Drop onto Image.
      4. Give the question a name (e.g. "Drag-and-Drop Image Question").
      5. Give the question some text (e.g. "Drag the hand to the coffee mug handle.")
      6. Upload mug.jpg as the Background Image.
      7. In Draggable Items, upload hand.jpg.
      8. Save Changes and Continue Editing.
      9. In Drop Zones, set {Left: 340, Top: 160, hand.jpg).
      10. Save Changes.
      11. Attempt the quiz.
      12. (Quiz Question Page) Positioning of hand.jpg item is fine on initial page load.
      13. Refresh the page. Positioning of item is no longer fine (not centered).
      14. Resize the window. The item will jump to where it's supposed to be.
      15. Refresh the page. Positioning of item is no longer fine (not centered).
      16. If you drag the item slightly and let go, the item jumps to the correct position.
      17. Drag the hand.jpg item to the mug.jpg answer position.
      18. Click Finish Attempt, and Submit All to Finish.
      19. (Quiz Review Page) On initial page load, the hand.jpg is sometimes in the wrong position on quiz review page.
      20. Refresh the page. Positioning of the item is no longer fine (slightly offset from answer position).
      21. Resize the window. The item will jump to where it's supposed to be.
      22. (Any Quiz Page) Toggle the Boost drawer menu. The answer box position moves with the drawer and is hence not positioned where it's supposed to be.

      Actual result
      ==========

      Behavior:

      • Quiz items in Drag-and-Drop-Onto-Image questions always have incorrect positions on page refresh (and sometimes on initial load of the quiz review page) (using Firefox).
      • Quiz items' answer box positions are incorrect when the Boost drawer is opened/closed.

       

      Expected result
      ============

      Quiz items and their answer boxes should have consistent positions and not be misaligned with what was set in the question settings.

      Other points
      ==========

      • Possibly related issue: MDL-58260
      • A hard refresh (Shift-Refresh) will always load items and the answer boxes in the right position.
      • A temporary fix would be to add this to your jQuery:

       

      $(window).bind("load", function() {
          $(window).trigger("resize");
      });

       

       

        Attachments

        1. mug.jpg
          mug.jpg
          8 kB
        2. hand.jpg
          hand.jpg
          4 kB
        3. backup-moodle2-activity-33-quiz33-20190211-1511.mbz
          36 kB
        4. 64393-demo.mov
          6.43 MB
        5. 6_firefox.jpg
          6_firefox.jpg
          60 kB
        6. 5_boost-drawer.jpg
          5_boost-drawer.jpg
          130 kB
        7. 4_reviewpage-aligned.jpg
          4_reviewpage-aligned.jpg
          130 kB
        8. 3_reviewpage-misaligned.jpg
          3_reviewpage-misaligned.jpg
          133 kB
        9. 2.PNG
          2.PNG
          72 kB
        10. 2_quizpage-centered.jpg
          2_quizpage-centered.jpg
          132 kB
        11. 1.PNG
          1.PNG
          141 kB
        12. 1_quizpage-offcenter.jpg
          1_quizpage-offcenter.jpg
          112 kB

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              nyanginator Nicholas Yang
              Peer reviewer:
              John Beedell
              Integrator:
              Andrew Nicols
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Tim Hunt, 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:
                11/Mar/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h