Moodle
  1. Moodle
  2. MDL-9451

Quiz answers can be lost if user navigates before page reloads

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6.4, 1.9
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      Sun v440, Solaris 10 with Coolstack 1.0 AMP
    • Database:
      Any
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      29537

      Description

      One of our instructors has several quizzes, set up to appear in a secure window. These are mostly multiple choice questions, with images. There are typically 15-20 questions per page. They are not using a timer.

      Several students in this course have been having trouble with lost answers. Observing the tests, we see them do the following:

      1 Answer all questions on the page.
      2 Click 'Save without submitting'
      3 Click on one of the page navigation links (next/previous or a page number).

      At this point, answers given on the previous page are often lost. What seems to be happening is that after they click 'Save without submitting', they do not always wait for the page to completely reload before navigating to another page.

      It looks like when a user presses 'Save' and then a page link, the form will get submitted and processed twice. If the page hasn't finished reloading from the first submit before the second submit occurs, some or all of the answers on that form are cleared.

      Many of the students are using IE, which doesn't show a status bar in secure mode, so students seem to be having a hard time determining if the page has actually finished loading.

      A quick fix would be to disable the page navigation links until the page has fully reloaded.

        Activity

        Hide
        N Hansen added a comment -

        My students have been having similar problems and I suspect something similar may be happening. In my case the quizzes are untimed and students come and go to work on them. This problem is especially frequent on page 1. From the description above, I suspect perhaps when they come back to work on the quiz, they are first shown page 1, which they may have already done, and they are navigating away from page 1 to the page they last worked on before page 1 is loaded, and this thereby resaves the questions without the answers. I'm going to peruse the logs some more to see if this theory holds up and maybe do some testing.

        Show
        N Hansen added a comment - My students have been having similar problems and I suspect something similar may be happening. In my case the quizzes are untimed and students come and go to work on them. This problem is especially frequent on page 1. From the description above, I suspect perhaps when they come back to work on the quiz, they are first shown page 1, which they may have already done, and they are navigating away from page 1 to the page they last worked on before page 1 is loaded, and this thereby resaves the questions without the answers. I'm going to peruse the logs some more to see if this theory holds up and maybe do some testing.
        Hide
        N Hansen added a comment -

        Yes! As I described above is exactly what is happening. I logged in as one of the students who had been having this problem. I had restored his answers on page one, but when I reentered the quiz and before any of the editors had even loaded on the page, I quickly clicked to go to another page in the quiz. When I came back to page 1, there were no answers there. I look in the database and the exact same thing happened-question was resaved, but with the answer field blank.

        Show
        N Hansen added a comment - Yes! As I described above is exactly what is happening. I logged in as one of the students who had been having this problem. I had restored his answers on page one, but when I reentered the quiz and before any of the editors had even loaded on the page, I quickly clicked to go to another page in the quiz. When I came back to page 1, there were no answers there. I look in the database and the exact same thing happened-question was resaved, but with the answer field blank.
        Hide
        Tim Hunt added a comment -

        I am pretty sure I have fixed this in Moodle 1.9 beta, and would really appreciate testing.

        If we are sure it works, I should be able to back-port the fix to the stable branches.

        Show
        Tim Hunt added a comment - I am pretty sure I have fixed this in Moodle 1.9 beta, and would really appreciate testing. If we are sure it works, I should be able to back-port the fix to the stable branches.
        Hide
        Tim Hunt added a comment -

        I just backported this fix to Moodle 1.8.

        Show
        Tim Hunt added a comment - I just backported this fix to Moodle 1.8.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: