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

Meta enrol plugin has useless code in course_deleted event observer

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.7.9, 2.8.7, 2.9.1, 3.0
    • 2.8.8, 2.9.2
    • Enrolments
    • 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

    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

            skylarkelty Skylar Kelty
            skylarkelty Skylar Kelty
            Marina Glancy Marina Glancy
            David Monllaó David Monllaó
            Ryan Wyllie Ryan Wyllie
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Sep/15