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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.6.3
    • 3.6.1
    • Quiz
    • MOODLE_36_STABLE
    • MOODLE_36_STABLE
    • 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.

       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");
      });

       

       

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

            timhunt Tim Hunt
            nyanginator Nicholas Yang
            John Beedell John Beedell (Inactive)
            Andrew Lyons Andrew Lyons
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.