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

match question restore db error on PostgreSQL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.3, 2.4
    • Fix Version/s: 2.3.7, 2.4.4
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      You need a course with a lot of matching questions.

      Back it up and restore it, and verify there are no regressions.

      Try some variants like restoring into an existing course, or duplicating a quiz with matching questions.

      Show
      You need a course with a lot of matching questions. Back it up and restore it, and verify there are no regressions. Try some variants like restoring into an existing course, or duplicating a quiz with matching questions.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:

      Description

      When restoring course, with match questions, from backup moodle throughout an error message and stops the proccess:

      Debug info: ERROR: invalid input syntax for integer: ""

      PostgreSQL does not handle empty strings as integer values. Problem lies in question/type/match/backup/moodle2/restore_qtype_match_plugin.class.php on line 190. Variable $subquestion could be empty string. This little code placed below line 189 solves the problem:

      if ($subquestion == '') {
          $subquestion = null;
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/13