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

Database activity import preset don't work correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.1
    • 1.9
    • None
    • 1.9 moodle with a 8.2.4 postgres installed in a SUSE Linux Enterprise Server 10 SP1
    • PostgreSQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      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

            stronk7 Eloy Lafuente (stronk7)
            apiedras Antonio Piedras Morente
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.