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

The task 'enrol_meta_sync' is in error when a group is deleted

XMLWordPrintable

      Hello,

      To describe the issue, I will use 'course1' and 'course2'.
      Course1 is set for whatever enrollment, while course2 has a meta enrollment from course1. In the settings, it points to 'group2'.

      When we delete 'group2', the 'customint2' field in the mdl_enrol table is not modified.

      If we add a user to course1, the task will attempt to add them to the previously deleted group, resulting in the following error:

      Execute scheduled task: Meta Enrollment Synchronization (enrol_meta\task\enrol_meta_sync)
      ... started 16:37:31. Current memory use 14.0 MB.
      Debugging increased temporarily due to faildelay of 86400
      ... used 3749 dbqueries
      ... used 13.196567058563 seconds
      Scheduled task failed: Meta Enrollment Synchronization (enrol_meta\task\enrol_meta_sync), Unable to find the data record in the groups table of the database.
      Debug info:
      SELECT * FROM {groups} WHERE id = ?
      [array (
      0 => '190598',
      )]
      Backtrace:line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 64 of /group/lib.php: call to moodle_database->get_record()
      line 350 of /enrol/meta/locallib.php: call to groups_add_member()
      line 55 of /enrol/meta/classes/task/enrol_meta_sync.php: call to enrol_meta_sync()
      line 263 of /lib/cronlib.php: call to enrol_meta\task\enrol_meta_sync->execute()
      line 167 of /admin/cli/scheduled_task.php: call to cron_run_inner_scheduled_task()

      Events are set up to listen for user_enrolment_created and role_assigned, but in some cases, the enrollment goes through the task instead of the events, possibly in cases of circular dependencies

       

            pholden Paul Holden
            jc.edunao Jeremy Carre
            Huong Nguyen Huong Nguyen
            Ilya Tregubov Ilya Tregubov
            CiBoT CiBoT
            Votes:
            4 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

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