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

Error when moving a course to an empty category on Postgres

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.6.7, 1.7.5, 1.8.6, 1.9.1
    • 1.9
    • Course
    • None
    • PostgreSQL
    • MOODLE_19_STABLE
    • MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      The code was

      if ($sortorder === false) {

      however, on Postgres (at lease)

      get_field_sql('SELECT MIN(sortorder)-1 AS min
      FROM ' . $CFG->prefix . 'course WHERE category=' . $categoryid);

      returns NULL, not false, if the category you are moving to is empty.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Petr Skoda Petr Skoda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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