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

Possible to drag questions "above" the quiz, making them inaccessible

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.9.5, 3.0.3
    • Fix Version/s: 2.9.6, 3.0.4
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      Upgrade test

      Before you upgrade:

      1. Create a quiz, and add three questions.
      2. If necessary, repaginate to have one question per page.
      3. Drag question 1 to above the Page 1 heading. (Nothing will appear to have happened.)
      4. Reload the page. (Question 1 will have disappeared.)

      Now, upgrade your Moodle.

      1. When you go back to the quiz, all questions should be visible again.

      Drag to top test

      1. Repaginate to one question per page, again.
      2. Drag Q1 to above the page 1 heading. (Nothing should appear to change.)
      3. Reload the page, and verify that nothing has changed.

      Drag to page 1 test

      1. If necessary, repaginate to one question per page, again.
      2. Drag Q1 and drop it on top of where it already is on page 1. (Nothing should appear to change.)
      3. Reload the page, and verify that nothing has changed.

      Drag to page 2 test

      1. If necessary, repaginate to one question per page, again.
      2. Drag Q1 and drop it at the top of page 2. Pages 1 and 2 should be merged, so now Page 1 contains Q1 & Q2, and Page 2 contains Q3.
      3. Reload the page, and verify that the result is still shown like that.

      Drag Q2 to page 3 test

      1. If necessary, repaginate to one question per page, again.
      2. Drag Q2 and drop it at the top of page 3. Pages 2 and 3 should be merged, so now Page 1 contains Q1, and Page 2 contains Q2 & Q3.
      3. Reload the page, and verify that the result is still shown like that.

      If you have any more patience, try other ways to break it. (You may want to add some extra questions or section headings.)

      Show
      Upgrade test Before you upgrade: Create a quiz, and add three questions. If necessary, repaginate to have one question per page. Drag question 1 to above the Page 1 heading. (Nothing will appear to have happened.) Reload the page. (Question 1 will have disappeared.) Now, upgrade your Moodle. When you go back to the quiz, all questions should be visible again. Drag to top test Repaginate to one question per page, again. Drag Q1 to above the page 1 heading. (Nothing should appear to change.) Reload the page, and verify that nothing has changed. Drag to page 1 test If necessary, repaginate to one question per page, again. Drag Q1 and drop it on top of where it already is on page 1. (Nothing should appear to change.) Reload the page, and verify that nothing has changed. Drag to page 2 test If necessary, repaginate to one question per page, again. Drag Q1 and drop it at the top of page 2. Pages 1 and 2 should be merged, so now Page 1 contains Q1 & Q2, and Page 2 contains Q3. Reload the page, and verify that the result is still shown like that. Drag Q2 to page 3 test If necessary, repaginate to one question per page, again. Drag Q2 and drop it at the top of page 3. Pages 2 and 3 should be merged, so now Page 1 contains Q1, and Page 2 contains Q2 & Q3. Reload the page, and verify that the result is still shown like that. If you have any more patience, try other ways to break it. (You may want to add some extra questions or section headings.)
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Using the drag and drop quiz editor, if you drag a question above page one, then let go, you get unexpected results.

      The UI redraws the question back on Page 1, but if you reload the page, you will see the question, and page 1 entirely is gone, with the quiz starting on page 2.

      The teacher and students cannot see the question, but it will be counted against students after they take the test, as an unanswered question.

      Somehow or another, the first section for the quiz in mdl_quiz_sections, the firstslot value gets moved up to 2, so slow 1 now isn't apart of any quiz section, resulting in the problem. I would expect that every quiz should always have a section that starts at slot 1 (eg the lowest firstslot value for a quiz should always = 1)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/May/16