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

XMLDB foreign key check should be more fault tolerent

    XMLWordPrintable

Details

    • MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Hide

      1. Either hand-edit an install.xml file (e.g. for qtype_match) to change one of the foreign keys to point to questions, not question table, or install qtype_combined (if you are quick, and get a copy before I fix it.)

      2. Edit a different foreign key to refer to a non-existend field.

      3. Go to XMLDB and run the foreign key check.

      4. Verify that the report completes, and reports the broken foreign-key def as part of the report.

      Show
      1. Either hand-edit an install.xml file (e.g. for qtype_match) to change one of the foreign keys to point to questions, not question table, or install qtype_combined (if you are quick, and get a copy before I fix it.) 2. Edit a different foreign key to refer to a non-existend field. 3. Go to XMLDB and run the foreign key check. 4. Verify that the report completes, and reports the broken foreign-key def as part of the report.

    Description

      Suppose you have a corrupt install.xml file, which defines a foreign key referencing the 'questions' table (which does not exist, it should be 'question'. At the moment this causes a fatal error, which stops the rest of the report from displaying.

      In this case, the report should report the problem as a non-fatal error, while showing the rest of the repot.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Sam Hemelryk Sam Hemelryk
              Sam Hemelryk Sam Hemelryk
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Jan/14