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

Course sections: multiple records with the same section number

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.9.8
    • Course
    • Any
    • MOODLE_19_STABLE

      For unknown reason, multiple records with the same section number exist within the single course (Moodle 1.9.5):

      db=> select id, section, sequence, visible from mdl_course_sections where course = 9630 order by section;
      id | section | sequence | visible
      -------------------------------------------------------+--------
      126077 | 0 | | 1
      132598 | 1 | | 1
      132579 | 1 | | 1
      132564 | 1 | | 1
      126078 | 1 | | 1
      126088 | 1 | | 1
      132599 | 2 | | 1
      132580 | 2 | | 1
      132565 | 2 | | 1
      126079 | 2 | | 1
      126089 | 2 | | 1
      132600 | 3 | | 1
      132581 | 3 | | 1
      132566 | 3 | | 1
      126090 | 3 | | 1
      126080 | 3 | | 1
      126081 | 4 | 242363,252739,252740,243288,252754,255210 | 1
      132601 | 4 | | 1
      132582 | 4 | | 1
      126091 | 4 | | 1
      132602 | 5 | | 1
      132583 | 5 | | 1
      126092 | 5 | 242367,242371,252765 | 1
      126082 | 5 | | 1
      132603 | 6 | | 1
      132584 | 6 | | 1
      126093 | 6 | 252766,252767,252768 | 1
      126083 | 6 | | 1

      This creates the situation when we can see the sections (in "topics" mode), but can't see any activities inside. And, if I transfer sequences manually into the section with lowest ID and thus make them visible, it's impossible to move the activites up and down after that - they just go to another hidden record and become invisible again.

      Putting aside the cause of the issue (which I haven't found yet), is there any reason why such records may legally exist? Wouldn't it be easier just to put a UNIQUE constraint for course+section?

            moodle.com Moodle HQ
            svidusov Sergey Vidusov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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