original_string: public function message_admins($notice) {
  
          $site = get_site();
  
          $subject = get_string('emailsubject', 'antivirus', format_string($site->fullname));
          $admins = get_admins();
          foreach ($admins as $admin) {
              $eventdata = new \core\message\message();
              $eventdata->courseid          = SITEID;
              $eventdata->component         = 'moodle';
              $eventdata->name              = 'errors';
              $eventdata->userfrom          = get_admin();
              $eventdata->userto            = $admin;
              $eventdata->subject           = $subject;
              $eventdata->fullmessage       = $notice;
              $eventdata->fullmessageformat = FORMAT_PLAIN;
              $eventdata->fullmessagehtml   = '';
              $eventdata->smallmessage      = '';
              message_send($eventdata);
          }
      }
code: public function message_admins($notice) {
  
          $site = get_site();
  
          $subject = get_string('emailsubject', 'antivirus', format_string($site->fullname));
          $admins = get_admins();
          foreach ($admins as $admin) {
              $eventdata = new \core\message\message();
              $eventdata->courseid          = SITEID;
              $eventdata->component         = 'moodle';
              $eventdata->name              = 'errors';
              $eventdata->userfrom          = get_admin();
              $eventdata->userto            = $admin;
              $eventdata->subject           = $subject;
              $eventdata->fullmessage       = $notice;
              $eventdata->fullmessageformat = FORMAT_PLAIN;
              $eventdata->fullmessagehtml   = '';
              $eventdata->smallmessage      = '';
              message_send($eventdata);
          }
      }
code_tokens: public function message_admins ( $ notice ) { $ site = get_site ( ) ; $ subject = get_string ( 'emailsubject' , 'antivirus' , format_string ( $ site -> fullname ) ) ; $ admins = get_admins ( ) ; foreach ( $ admins as $ admin ) { $ eventdata = new \ core \ message \ message ( ) ; $ eventdata -> courseid = SITEID ; $ eventdata -> component = 'moodle' ; $ eventdata -> name = 'errors' ; $ eventdata -> userfrom = get_admin ( ) ; $ eventdata -> userto = $ admin ; $ eventdata -> subject = $ subject ; $ eventdata -> fullmessage = $ notice ; $ eventdata -> fullmessageformat = FORMAT_PLAIN ; $ eventdata -> fullmessagehtml = '' ; $ eventdata -> smallmessage = '' ; message_send ( $ eventdata ) ; } }
docstring: Email admins about antivirus scan outcomes.
  
  @param string $notice The body of the email to be sent.
  @return void
docstring_tokens: Email admins about antivirus scan outcomes .