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

Course import page fails if user has > 1000 courses (ORA-01795)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.9.8
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Environment:
      Moodle 1.9.8 on Linux running PHP 5.2.10, Apache 2, database is Oracle 10.1
    • Database:
      Oracle
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      On the course > import page we run into a problem if the user has course:update capability on more than 1000 courses.
      In moodle/course/import/activities/mod.php there is a call to get_records_list:

      $taught_courses = array();
      if (!empty($tcourseids))

      { $tcourseids = substr($tcourseids,0,-1); $taught_courses = get_records_list('course', 'id', $tcourseids, 'sortorder'); }

      If $tcourseids has more than 100 items then we get Oracle error
      ORA-01795: maximum number of expressions in a list is 1000

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              danmarsden Dan Marsden
              Reporter:
              mikehughes Michael Hughes
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: