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

Quiz navigation: scroll to question does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.7, 3.1.3
    • 3.0.6, 3.1.2, 3.2
    • Quiz
    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • Hide
      1. Create a quiz with How questions behave: Immediate feedback.
      2. Add 2 questions on page 1, and 2 questions on page 2. (Question type does not matter. True/false questoins are easiest to create.)
      3. Attempt the quiz as a students (or preview it as a teacher).
      4. Click on the navigation button for question 4.
      5. Verify that page 2 of the quiz loads, scrolled down to question 4.
      6. Change the page scroll position slightly, if you like.
      7. Answer the question, and click the Check button.
      8. Verify that the page reloads to exactly the same scroll position as it was before.
      9. Click the navigation button for Q1.
      10. Verify that page 1 of the quiz loads, scrolled to the top.
      Show
      Create a quiz with How questions behave: Immediate feedback. Add 2 questions on page 1, and 2 questions on page 2. (Question type does not matter. True/false questoins are easiest to create.) Attempt the quiz as a students (or preview it as a teacher). Click on the navigation button for question 4. Verify that page 2 of the quiz loads, scrolled down to question 4. Change the page scroll position slightly, if you like. Answer the question, and click the Check button. Verify that the page reloads to exactly the same scroll position as it was before. Click the navigation button for Q1. Verify that page 1 of the quiz loads, scrolled to the top.

      Steps to reproduce (this is easier to see if your theme has a verbose footer, e.g. turn on display of performance info; or the questions have verbose question text and so are quite tall):

      1. Create a quiz with 2 questions on page 1 and 2 questions on page 2.
      2. Start an attempt or preview.
      3. Click on the navigation button for question 4.

      Expected result:

      You go to a URL like .../mod/quiz/attempt.php?attempt=7&page=1#q4, and when the page loads, you are scrolled down to question 4.

      Actual result:

      You go to a URL like .../mod/quiz/attempt.php?attempt=8&page=1&scrollpos=0#q4#q2, so that the fragment identifier is screwed up, and even if it was not, the scroll manager javascript forces you back to the top of the page.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Sam Marshall Sam Marshall
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            cameron1729 cameron1729
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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