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

Error writing to Database -uploading GIFT Questions

    XMLWordPrintable

    Details

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

      The unit tests provide a pretty good test to make sure these changes do not break anything. However, a bit of manual testing through the Moodle UI to verify there are no regressions would be appreciated.

      1. Choose a format to test (e.g. Moodle XML or GIFT).

      2. Find a sample file (e.g. question/format/gift/tests/fixtures/questions.gift.txt).

      3. Import it into the question bank.

      4. Check that the names of the imported questions are what you would expect.

      5. Also try importing questions into the lesson module.

      Show
      The unit tests provide a pretty good test to make sure these changes do not break anything. However, a bit of manual testing through the Moodle UI to verify there are no regressions would be appreciated. 1. Choose a format to test (e.g. Moodle XML or GIFT). 2. Find a sample file (e.g. question/format/gift/tests/fixtures/questions.gift.txt). 3. Import it into the question bank. 4. Check that the names of the imported questions are what you would expect. 5. Also try importing questions into the lesson module.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When I try to import questions into the question bank using GIFT format I get error writing to databse and following debugging information:
      Debug info:
      Stack trace:
      line 410 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1029 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1071 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 412 of /question/format.php: call to mysqli_native_moodle_database->insert_record()
      line 119 of /question/import.php: call to qformat_default->importprocess()

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Nov/12