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

Database activity import preset don't work correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Labels:
      None
    • Environment:
      1.9 moodle with a 8.2.4 postgres installed in a SUSE Linux Enterprise Server 10 SP1
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When importing a database preset, there is an SQL error by an uninitialized variable.
      The error shows some like this:

      ERROR: invalid input syntax for integer: ""

      UPDATE mdl_data SET course .....defaultsortdir = '0',editany = '0',notification = '' WHERE id = 9

      the error is in the notification variable.

      For solve this we must modify the file /moodle/mod/data/lib.php
      and put in the function: data_update_instance($data)
      this code:
      if (empty($data->notification))

      { $data->notification = 0; }

      before call the function:
      if (! update_record('data', $data))

      { return false; }

      See you

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/08