• MOODLE_500_STABLE
    • MOODLE_500_STABLE
    • Hide

      Testing Questions

      1. Install a new question type we can use for testing. I chose to use (https://github.com/marcusgreen/moodle-qtype_wordselect) but any other question type will do
      2. Create a course and a quiz on the course
      3. Go to the quiz question bank and create 2 questions of the newly installed type
      4. Add 1 of those questions to the quiz
      5. Remove the "wordselect" question type by deleting the question/type/wordselect directory (or whichever one you chose to install)
      6. Purge caches
      7. Return to the quiz "questions" page and confirm that the missing question is highlighted red with a label saying "invalid question type: wordselect"
      8. Confirm that in that question row, the preview link is not there, as preview won't work
      9. Try to add the other question of the missing type to the quiz, from the question bank - confirm that it is not allowed and throws an exception
      10. Attempt to preview the quiz as a teacher/adminer, or take the quiz as a student - confirm that the button to do so is no longer present, as the quiz will not work with invalid questions, and is replaced with an error message saying "This quiz has questions with invalid types. It cannot be used until the questions are fixed."

      Testing Random Questions - Should not be able to select an invalid question

      1. Delete one of the "wordselect" questions from the quiz questionbank so there is only 1 available
      2. Add another question of any type, e.g. true/false
      3. Remove any existing questions from the quiz itself
      4. Add a Random question to the quiz which can pick between those 2 questions, so that should be the only question slot on the quiz now
      5. Preview/take the quiz multiple times and confirm it always picks the true/false question
      6. Delete the true/false question and then attempt the quiz again - confirm that it says there are not enough questions to choose from, even though the wordselect one is still there (as we shouldn't be able to use it)
      Show
      Testing Questions Install a new question type we can use for testing. I chose to use ( https://github.com/marcusgreen/moodle-qtype_wordselect ) but any other question type will do Create a course and a quiz on the course Go to the quiz question bank and create 2 questions of the newly installed type Add 1 of those questions to the quiz Remove the "wordselect" question type by deleting the question/type/wordselect directory (or whichever one you chose to install) Purge caches Return to the quiz "questions" page and confirm that the missing question is highlighted red with a label saying "invalid question type: wordselect" Confirm that in that question row, the preview link is not there, as preview won't work Try to add the other question of the missing type to the quiz, from the question bank - confirm that it is not allowed and throws an exception Attempt to preview the quiz as a teacher/adminer, or take the quiz as a student - confirm that the button to do so is no longer present, as the quiz will not work with invalid questions, and is replaced with an error message saying "This quiz has questions with invalid types. It cannot be used until the questions are fixed." Testing Random Questions - Should not be able to select an invalid question Delete one of the "wordselect" questions from the quiz questionbank so there is only 1 available Add another question of any type, e.g. true/false Remove any existing questions from the quiz itself Add a Random question to the quiz which can pick between those 2 questions, so that should be the only question slot on the quiz now Preview/take the quiz multiple times and confirm it always picks the true/false question Delete the true/false question and then attempt the quiz again - confirm that it says there are not enough questions to choose from, even though the wordselect one is still there (as we shouldn't be able to use it)
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-84302 using repository: https://github.com/timhunt/moodle.git

      Should these errors be fixed?

      Built on: Wed Mar 19 12:19:47 UTC 2025

      Show
      Code verified against automated checks with warnings. Checked MDL-84302 using repository: https://github.com/timhunt/moodle.git main (0 errors / 1 warnings) [branch: MDL-84302 | CI Job ] overview (0/1) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Warn: the branch is based off integration.git Should these errors be fixed? Built on: Wed Mar 19 12:19:47 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84302 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18697/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64040/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64041/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64042/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64043/ App tests (stable app version) / complete) Built on: Wed Mar 19 20:36:59 UTC 2025

      Quiz

      Invalid questions in a quiz should:

      • Still be displayed in the list of questions, but be clearer they are invalid
      • Not be allowed to be added to a quiz (manually or via random questions)
      • Have better error handling when attempting the quiz than a thrown exception, or possibly remove the option to preview/take the quiz
      • NOTE: When MDL-84247 is integrated, it will also not be possible to Add the invalid question to the quiz, but that is handled by that different tracker

        1. MDL-84302-ss1.png
          62 kB
          CMR
        2. MDL-84302-ss2.png
          41 kB
          CMR
        3. question badges.png
          9 kB
          Mark Johnson
        4. (1) 10 Passed -- (Main)MDL-84302.png
          65 kB
          Kim Jared Lucas
        5. (1) 8 Passed -- (Main)MDL-84302.png
          87 kB
          Kim Jared Lucas
        6. (1) 9 Passed -- (Main)MDL-84302.png
          51 kB
          Kim Jared Lucas
        7. (2) 5 Passed -- (Main)MDL-84302.png
          59 kB
          Kim Jared Lucas
        8. (2) 6 Passed -- (Main)MDL-84302.png
          47 kB
          Kim Jared Lucas

            cwarwicker CMR
            cwarwicker CMR
            Mark Johnson Mark Johnson
            Tim Hunt Tim Hunt
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 54 minutes
                54m

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