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

Add "Disable course enrolment" enrol_manual expiration action

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.6
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      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"
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w24_MDL-37974_m26_manexpire

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    18/Nov/13