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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5.6, 2.6.3, 2.7
    • 2.6.4, 2.7.1
    • 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).

    Description

      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'.

      Attachments

        Issue Links

          Activity

            People

              emerrill Eric Merrill
              emerrill Eric Merrill
              Tim Hunt Tim Hunt
              Damyon Wiese Damyon Wiese
              Jetha Chan Jetha Chan
              Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jul/14