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

XMLDB foreign key check should be more fault tolerent

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      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

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Peer reviewer:
              Eloy Lafuente (stronk7)
              Integrator:
              Sam Hemelryk
              Tester:
              Sam Hemelryk
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/14