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

Meta enrol plugin has useless code in course_deleted event observer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.7.9, 2.8.7, 2.9.1, 3.0
    • Fix Version/s: 2.8.8, 2.9.2
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Sep/15