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

Course Manual enrollment instance "Notify before enrolment expires" setting does not default correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.2, 3.5.3, 3.5.4, 3.6, 3.6.1, 3.6.2, 3.7, 3.8.5, 3.9.2
    • Fix Version/s: None
    • Component/s: Enrolments
    • Testing Instructions:
      Hide
      1. Go to manual enrolment plugin settings and set 'Enroller + Enrolled' value for the 'enrol_manual | expirynotify' setting.
      2. Create a course.
      3. Go to enrolment instances list inside the course and open the config page of manual enrolment instance.
      4. Ensure that the 'enrol_manual | expirynotify' parameter is set to 'Enroller + Enrolled'.
      Show
      Go to manual enrolment plugin settings and set 'Enroller + Enrolled' value for the 'enrol_manual | expirynotify' setting. Create a course. Go to enrolment instances list inside the course and open the config page of manual enrolment instance. Ensure that the 'enrol_manual | expirynotify' parameter is set to 'Enroller + Enrolled'.
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-64648-master_enrol_manual_notify_expires_default
    • Story Points:
      3
    • Sprint:
      Moppies Moodle 3.8 Sprint 1, Moppies Moodle 3.8 Sprint 2, Moppies Moodle 3.8 Sprint 3, Moppies Moodle 3.8 Sprint 4, Moppies Moodle 3.8 Sprint 5, Moppies Moodle 3.8 Sprint 6

      Description

      When creating a new course with manual enrollments enabled, if the manual enrolment plugin
      Notify before enrolment expires (enrol_manual | expirynotify) setting is set to "Enroller + Enrolled" (or the new "Teacher + Enrolled user" language string in 3.6), the course manual enrollment instance will default to "Enroller".  You would expect it to be set to "Enroller + Enrolled" to match the default.

       
      This looks to be caused by the call to add_default_instance in https://github.com/moodle/moodle/blob/master/enrol/manual/lib.php#L128.  It looks like the code was borrowed from get_instance_defaults in the the self-enrol plugin (https://github.com/moodle/moodle/blob/master/enrol/self/lib.php#L337), which correctly sets the course expirynotify to Enroller since, in Self-Enrol, the Enroller and Enrolled are the same person, and you would not want them to receive two notifications.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vtos Vitaly Potenko
              Reporter:
              jesse.safran Jesse Safran
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              8 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 minutes
                  5m