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

Deleted questions remain in question bank when they are no longer used and have never been

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 3.5.3
    • Fix Version/s: None
    • Component/s: Questions, Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      Environment

      Moodle 2018051703.07 (3.5.3+ (Build: 20181204))

      Steps to reproduce

      1. In a course, create a new quiz.
      2. Edit the quiz.
      3. From there, create a new question in category “standard for <course>”.
      4. Go to the course.
      5. Go to the question bank.
      6. Delete the question created in the preceding step.
        You will see a confirmation popup:

        Confirm

        Are you absolutely sure you want to delete the following questions?

        • <question title>

        (* Questions marked by an asterisk are already in use in some quizzes. These questions will not be deleted from these quizzes but only from the category list.)

        Confirm the deletion.
        The question will be marked as deleted/old in the question bank, but still be there. This is correct behaviour.

      1. Go to the course.
      2. Delete the quiz created above.
        Confirm the deletion in the popup.
      3. Go to the question bank.

      Actual behaviour

      The question will still be there. Even though nobody has ever taken the quiz, and it is not used anywhere anymore.

      (By the way, the question can now be restored, and then successfully deleted.)

      Expected behaviour

      • In this case: the question is now really deleted (it is no longer visible in the question bank).
      • In general: questions which have never been taken by anyone and which are marked as deleted in the question bank should be fully deleted from the question bank as soon as the last quiz using them is deleted.

      Further notes

      Perhaps this issue is related to a wrong interpretation of a question being in use (also considering quizzes about to be deleted). It could be related to MDL-57865, or may be related to MDL-20154 (but I don’t fully understand the latter).

        Attachments

          Activity

            People

            • Assignee:
              timhunt Tim Hunt
              Reporter:
              nicoroeser Nico Roeser
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: