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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2.2
    • 3.2 regressions, 3.2.1
    • 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

      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);
               }
           }
      

            Unassigned Unassigned
            lksato Leandro
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.