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

Quiz doesn't reuse random questions (but tries to)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6.4, 2.7.1
    • 2.5.6, 2.6.3, 2.7
    • Quiz
    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MDL-45763-master
    • Hide
      1. Test that the upgrade form the previous version does not cause any DB errors.
      2. Add a quiz.
      3. In the quiz, add a random question.
      4. In mdl_question, find the question.
      5. Make sure the questiontext is '0'.
      6. Remove the random question, and add one back.
      7. Confirm that no additional questions were added to the table.
      8. Add a random question with include sub-categories on.
      9. In mdl_question, confirm there is now a 2nd question, with questiontext '1'.
      10. Remove the random question, and add it back, confirm that an additional question was not added.
      11. Add a new random question (3rd), and confirm that it is created in mdl_question
      12. Restore the backup file attached to this ticket.
      13. Find the new entries in mdl_question, and confirm that there are two random questions, one with questiontext '0', one with '1'.

      Please test steps 1. and 12-13. in all supported databases (sorry).

      Show
      Test that the upgrade form the previous version does not cause any DB errors. Add a quiz. In the quiz, add a random question. In mdl_question, find the question. Make sure the questiontext is '0'. Remove the random question, and add one back. Confirm that no additional questions were added to the table. Add a random question with include sub-categories on. In mdl_question, confirm there is now a 2nd question, with questiontext '1'. Remove the random question, and add it back, confirm that an additional question was not added. Add a new random question (3rd), and confirm that it is created in mdl_question Restore the backup file attached to this ticket. Find the new entries in mdl_question, and confirm that there are two random questions, one with questiontext '0', one with '1'. Please test steps 1. and 12-13. in all supported databases (sorry).

      The quiz has logic to try and reuse random questions if they exist and are not in use, but because change in the question text handling, it is broken.

      Question text should be '0' for no-includesubcategories, and '1' for includesubcategories. Under the current code, it is either '' (blank) or '1'.

            emerrill Eric Merrill
            emerrill Eric Merrill
            Tim Hunt Tim Hunt
            Damyon Wiese Damyon Wiese
            Jetha Chan Jetha Chan
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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