Moodle
  1. Moodle
  2. MDL-11496

SQL error when deleting a unit via the Publisher - delete groupings

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Groups
    • Labels:
      None
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      28509

      Description

      Reporter - Gareth Morgan - Thanks! 2007-09-27 17:43 (OU Bug 3877)
      ...
      Now, however, a SQL error is ocurring further down the remove_course_contents function where it does the following:

      groups_delete_groupings($courseid, true);
      groups_delete_groups($courseid, true);

      The output is now:

      Deleted groupings
      ERROR: current transaction is aborted, commands ignored until end of transaction block

      SELECT * FROM mdl5a_groups WHERE courseid = '16'

      line 779 of lib/dmllib.php: call to debugging()
      line 703 of lib/dmllib.php: call to get_recordset_sql()
      line 671 of lib/dmllib.php: call to get_recordset_select()
      line 964 of lib/dmllib.php: call to get_recordset()
      line 190 of group/lib.php: call to get_records()
      line 3573 of lib/moodlelib.php: call to groups_delete_groups()
      line 3423 of lib/moodlelib.php: call to remove_course_contents()
      line 3761 of local/sa/publish.php: call to delete_course()
      line 3810 of local/sa/publish.php: call to publish->delete_course()
      line 505 of local/sa/publish.php: call to publish->delete_course_byname()
      line 906 of local/sa/lib.php: call to publish->publish_course()
      line 331 of local/sa/call_publisher_manually.php: call to cpm_run_publisher()

      — Comment #3 From Jenny Gray 2007-09-28 08:46 —

      Nick may be able to advise us on this one then. I would guess it affects the manual deletion of a course as well as our automated process.

      — Comment #4 From Gareth Morgan 2007-09-28 11:50 —

      Traced problem to line 215 in group/lib.php

      set_field('course_modules', 'groupingid', 0, 'courseid', $courseid);

      field courseid is actually called course in the database - checking with the VLE team that they have not heard of this being renamed, before changing it to 'course'.

        Activity

        Hide
        Nick Freear added a comment -

        Committed fix to HEAD, groups_delete_groupings function in group/lib.php
        Fixed.

        Show
        Nick Freear added a comment - Committed fix to HEAD, groups_delete_groupings function in group/lib.php Fixed.

          People

          • Assignee:
            Nick Freear
            Reporter:
            Nick Freear
            Tester:
            Nobody
            Participants:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: