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

Quiz navigation: scroll to question does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.6, 3.1.2, 3.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16