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

Meta enrol plugin has useless code in course_deleted event observer

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • Hide
      • Set enrol_meta/unenrolaction to "Disable module enrolment and remove roles" (default).
      • Create two courses, enrol some users on the first course
      • Add a meta link to the first course in the second course
      • Delete the first course
      • Ensure enrolments have been suspended and roles removed in the second course
      Show
      Set enrol_meta/unenrolaction to "Disable module enrolment and remove roles" (default). Create two courses, enrol some users on the first course Add a meta link to the first course in the second course Delete the first course Ensure enrolments have been suspended and roles removed in the second course

      The course_deleted observer for enrol_meta has a small typo which keeps the courseid reference hanging around after the course has been deleted.

      $enrol->customint = 0;
      

      Should be customint1 as customint is not a valid field name.

      $enrol->customint1 = 0;
      

      The update call is useless and I'd suggest we just remove it and preserve the existing functionality rather than potentially introducing regressions by changing the way this works.

            skylarkelty Skylar Kelty
            skylarkelty Skylar Kelty
            Marina Glancy Marina Glancy
            David Monllaó David Monllaó
            Ryan Wyllie Ryan Wyllie
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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