original_string: private function notification(\context $context, \stdClass $user, \moodle_url $insighturl, string $fullmessage, string $fullmessagehtml) {
  
          $message = new \core\message\message();
          $message->component = 'moodle';
          $message->name = 'insights';
  
          $message->userfrom = \core_user::get_noreply_user();
          $message->userto = $user;
  
          $message->subject = $this->target->get_insight_subject($this->modelid, $context);
  
          // Same than the subject.
          $message->contexturlname = $message->subject;
          $message->courseid = $this->get_context_courseid($context);
  
          $message->fullmessage = $fullmessage;
          $message->fullmessageformat = FORMAT_PLAIN;
          $message->fullmessagehtml = $fullmessagehtml;
          $message->smallmessage = $fullmessage;
          $message->contexturl = $insighturl->out(false);
  
          message_send($message);
      }
code: private function notification(\context $context, \stdClass $user, \moodle_url $insighturl, string $fullmessage, string $fullmessagehtml) {
  
          $message = new \core\message\message();
          $message->component = 'moodle';
          $message->name = 'insights';
  
          $message->userfrom = \core_user::get_noreply_user();
          $message->userto = $user;
  
          $message->subject = $this->target->get_insight_subject($this->modelid, $context);
  
          // Same than the subject.
          $message->contexturlname = $message->subject;
          $message->courseid = $this->get_context_courseid($context);
  
          $message->fullmessage = $fullmessage;
          $message->fullmessageformat = FORMAT_PLAIN;
          $message->fullmessagehtml = $fullmessagehtml;
          $message->smallmessage = $fullmessage;
          $message->contexturl = $insighturl->out(false);
  
          message_send($message);
      }
code_tokens: private function notification ( \ context $ context , \ stdClass $ user , \ moodle_url $ insighturl , string $ fullmessage , string $ fullmessagehtml ) { $ message = new \ core \ message \ message ( ) ; $ message -> component = 'moodle' ; $ message -> name = 'insights' ; $ message -> userfrom = \ core_user :: get_noreply_user ( ) ; $ message -> userto = $ user ; $ message -> subject = $ this -> target -> get_insight_subject ( $ this -> modelid , $ context ) ; // Same than the subject. $ message -> contexturlname = $ message -> subject ; $ message -> courseid = $ this -> get_context_courseid ( $ context ) ; $ message -> fullmessage = $ fullmessage ; $ message -> fullmessageformat = FORMAT_PLAIN ; $ message -> fullmessagehtml = $ fullmessagehtml ; $ message -> smallmessage = $ fullmessage ; $ message -> contexturl = $ insighturl -> out ( false ) ; message_send ( $ message ) ; }
docstring: Generates a insight notification for the user.
  
  @param  \context    $context
  @param  \stdClass   $user
  @param  \moodle_url $insighturl    The insight URL
  @param  string      $fullmessage
  @param  string      $fullmessagehtml
  @return null
docstring_tokens: Generates a insight notification for the user .