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

Welcome e-mails are sent even when 'sendcoursewelcomemessage' is set to 'no'

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2 regressions, 3.2.1
    • 3.2.2
    • Enrolments
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • wip-MDL-57782-master
    • Hide
      1. Enable self-enrolment in a course and specify "Send course welcome message" as "No"
      2. Self-enrol as another user and make sure no email was sent
      3. As teacher/admin change this enrolment method to send course welcome message
      4. As yet another user enrol yourself in a course and make sure email was sent
      Show
      Enable self-enrolment in a course and specify "Send course welcome message" as "No" Self-enrol as another user and make sure no email was sent As teacher/admin change this enrolment method to send course welcome message As yet another user enrol yourself in a course and make sure email was sent

    Description

      I've upgraded from Moodle 3.1 to 3.2.1 and now Moodle is sending welcome e-mails to students who self enrol on the courses, even when "Send course welcome message" is set to "no" (both on plugin config and course instance).

      I've changed the code at enrol/self/lib.php and it seens to fix the problem:

      diff --git a/enrol/self/lib.php b/enrol/self/lib.php
      index 565f3ef..db8ed4b 100644
      --- a/enrol/self/lib.php
      +++ b/enrol/self/lib.php
      @@ -173,7 +173,7 @@ class enrol_self_plugin extends enrol_plugin {
                   }
               }
               // Send welcome message.
      -        if ($instance->customint4 !== ENROL_DO_NOT_SEND_EMAIL) {
      +        if ($instance->customint4 != ENROL_DO_NOT_SEND_EMAIL) {
                   $this->email_welcome_message($instance, $USER);
               }
           }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lksato Leandro
              Marina Glancy Marina Glancy
              Dan Poltawski Dan Poltawski
              Rajesh Taneja Rajesh Taneja
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Mar/17