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

Quiz 4.0: 'Always latest' version for a question in a quiz should mean 'latest ready version'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.0
    • 4.0
    • Quiz
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      The automated tests for mod_quiz are generally quite strong, and they have been extended specifically to cover some of the cases that were specifically fixed here.

      I think that, what is needed on top of that is some general smoke-testing on the quiz, to ensure there are no regressions. The focus needs to be, in particular, on building the quiz, attempting it as a student, and then checking all the reports. So, roughtly,

      1. Crete some questions in the question bank.
      2. Edit some to make some extra versions, and perhaps some of those versions should be draft.
      3. Create a quiz.
      4. Add some questions directly to the quiz, some from the question bank, and some random.
      5. Have some of the quizzes set to Always latest, and some set to specific versions.
      6. Attempt the quiz as one student.
      7. Now, edit some of the questions in the question bank.
      8. Attempt the quiz as a second student.
      9. As teacher, click through all the quiz reports.
      10. And, in particular, try re-grading the quiz in the Grades report.

      That sounds like a lot, but as I said at first, this is just a human smoke test on top of all the detail automated testing, so hopefully this could be done in around half an hour.

      (Note, we already have MDL-74452 recorded.)

      Show
      The automated tests for mod_quiz are generally quite strong, and they have been extended specifically to cover some of the cases that were specifically fixed here. I think that, what is needed on top of that is some general smoke-testing on the quiz, to ensure there are no regressions. The focus needs to be, in particular, on building the quiz, attempting it as a student, and then checking all the reports. So, roughtly, Crete some questions in the question bank. Edit some to make some extra versions, and perhaps some of those versions should be draft. Create a quiz. Add some questions directly to the quiz, some from the question bank, and some random. Have some of the quizzes set to Always latest, and some set to specific versions. Attempt the quiz as one student. Now, edit some of the questions in the question bank. Attempt the quiz as a second student. As teacher, click through all the quiz reports. And, in particular, try re-grading the quiz in the Grades report. That sounds like a lot, but as I said at first, this is just a human smoke test on top of all the detail automated testing, so hopefully this could be done in around half an hour. (Note, we already have MDL-74452 recorded.)

      Steps to reproduce:

      A)

      1. In the question bank, create a true-false, question with text 'This question is ready to use', Correct answer 'True', and State 'Ready'.
      2. Create a quiz, and add this question. Ensure that the version to use is 'Always latest'.
      3. Edit the question to add a second version. Change the right answer to 'False' and state to Draft.
      4. Preview the quiz.

      Expected result: to get the question right, you need to answer True, becuase only 'Ready' question versions should be considered by 'Always latest'.

      Actual result: you get v2, and so True gets marked wrong.

      Also, on the quiz Questions page, the question text from v2 is shown, and the versions drop-down include v2.

      B)

      1. In the question bank, create a true-false, question with text 'This question is ready to use', Correct answer 'True', and State 'Ready'.
      2. Edit the question to add a second version. Change the right answer to 'False' and state to Draft.
      3. Create a quiz, and choose add from question bank.

      Expected result: You can choose to add the True-false question, because it has a non-draft version.

      Actual result: question does not appear in the dialogue.


      Some of the SQL in mod/quiz/classes/question/bank/qbank_helper.php, especially in get_always_latest_version_question_ids, needs to be tweaked.

      We shoudl also check with Random questions. Again, random questions should only select ready versions.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Safat Shahin Safat Shahin
            Jun Pataleta Jun Pataleta
            Gladys Basiana Gladys Basiana
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 30 minutes
                5h 30m

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