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

Backup missing questions in more situations than expected

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.9.9, 2.0
    • Fix Version/s: STABLE backlog
    • Component/s: Questions, Quiz
    • Labels:
    • Database:
      Any
    • Difficulty:
      Difficult
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      In the past we have had numerous reports about not all questions being included in backup, leading to restore errors. This is one example of report: MDL-16275 (sure there are more).

      Until now we thought it was one more or less uncommon situation, but reviewing the code I think it is really easy to get a non-consistent backup, missing entire categories.

      To reproduce:

      1) Just create two categories, "A" and "B", then create one course "course A" in category "A".
      2) In "course A" create one quiz and add one question to the category "A".
      3) Move the course from category "A" to "category "B".
      4) Make one backup of the course. The generated backup will be missing any question, so will break on restore for sure.

      So, any course moved to another "branch" category using questions from question banks over course level will lead to broken backups. Really horrible.

      Also, at the end... you can have one quiz using questions from any other context in the server what breaks any capability checking and friends.

      IMO this should be fixed ASAP in 1.9 and reworked in 2.0. Also, ideally... we should prevent course movements to another branches if there are category-level question banks associated, to avoid the spread of questions transversally ASAP.

      Ciao

        Gliffy Diagrams

          Attachments

          1. A_B.diff.txt
            2 kB
          2. A.zip
            14 kB
          3. B.zip
            14 kB

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: