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

Add "Disable course enrolment" enrol_manual expiration action

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.1
    • 2.6
    • Enrolments
    • MOODLE_24_STABLE
    • MOODLE_26_STABLE
    • w24_MDL-37974_m26_manexpire
    • Hide

      1/ InSite administration ⟩ Plugins ⟩ Enrollments ⟩ Manual enrollments, set Enrolment expiration action to "Disable course enrolment".
      2/ Enrol some users
      3/ Edit enrolment to end in the past
      4/ Run enrol/manual/cli/sync.php in verbose mode
      5/ Verify the enrolments are suspended and roles kept in place
      6/ Repeat with "Disable course enrolment, remove roles"

      Show
      1/ InSite administration ⟩ Plugins ⟩ Enrollments ⟩ Manual enrollments, set Enrolment expiration action to "Disable course enrolment". 2/ Enrol some users 3/ Edit enrolment to end in the past 4/ Run enrol/manual/cli/sync.php in verbose mode 5/ Verify the enrolments are suspended and roles kept in place 6/ Repeat with "Disable course enrolment, remove roles"

    Description

      This is an enhancement to MDL-35063 "Add setting for cron action after enrolment expiration - enrol_manual".
      There was some discussion of it there. This adds an option to suspend the ser without deleting their roles
      and other information.

      With the recently merged MDL-35063, you can either have an expiration event AND delete data (roles and role dependent data),
      or not have an expiration event and not delete anything. This patch adds the option to fire an event but NOT remove roles.
      Like MDL-35063, this patch marks the enrolment "suspended", partially as a flag to avoid firing the event repeatedly.

      To reproduce:
      In Site administration ⟩ Plugins ⟩ Enrollments ⟩ Manual enrollments, set Enrolment expiration action to
      "Disable course enrolment and remove roles".
      Let an enrolment expire and the cron run.

      What happens:
      The enrolment is suspended, and the user data is removed. For example, with the "student" role removed, their grades are no longer available.

      What is desired:
      With this patch, one can avoid deleting student data by using the new ""Disable course enrolment" option
      rather than the existing ""Disable course enrolment and remove roles" option.

      Attachments

        Issue Links

          Activity

            People

              raymor Ray Morris
              raymor Ray Morris
              Petr Skoda Petr Skoda
              Dan Poltawski Dan Poltawski
              Sam Hemelryk Sam Hemelryk
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13