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

Avoid sending emails when IMS file is NOT new (IMS Enterprise file enrolments)

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 1.6, 1.7, 1.8, 1.9
    • Enrolments
    • None
    • MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Add condicional before sending to Admin IMS log. Only send mail, if IMS file is new.

      STABLE BRANCH:
      line 382:
      if ( $fileisnew ) {
      email_to_user(get_admin(), get_admin(), "Moodle IMS Enterprise enrolment notification", $msg);
      $this->log_line('Notification email sent to administrator.');
      }

      MAIN BRANCH:
      if ( $fileisnew ) {
      $eventdata = new object();
      $eventdata->modulename = 'moodle';
      $eventdata->userfrom = get_admin();
      $eventdata->userto = get_admin();
      $eventdata->subject = "Moodle IMS Enterprise enrolment notification";
      $eventdata->fullmessage = $msg;
      $eventdata->fullmessageformat = FORMAT_PLAIN;
      $eventdata->fullmessagehtml = '';
      $eventdata->smallmessage = '';
      events_trigger('message_send', $eventdata);
      }

            poltawski Dan Poltawski
            tmas Toni Mas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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