original_string: public function selected_plugintype_mismatch($detected) {
  
          $mform = $this->_form;
          $mform->addRule('plugintype', get_string('required'), 'required', null, 'client');
          $mform->setAdvanced('plugintype', false);
          $mform->setAdvanced('permcheck', false);
          $mform->insertElementBefore($mform->createElement('static', 'selectedplugintypemismatch', '',
              html_writer::span(get_string('typedetectionmismatch', 'tool_installaddon', $detected), 'error')), 'permcheck');
      }
code: public function selected_plugintype_mismatch($detected) {
  
          $mform = $this->_form;
          $mform->addRule('plugintype', get_string('required'), 'required', null, 'client');
          $mform->setAdvanced('plugintype', false);
          $mform->setAdvanced('permcheck', false);
          $mform->insertElementBefore($mform->createElement('static', 'selectedplugintypemismatch', '',
              html_writer::span(get_string('typedetectionmismatch', 'tool_installaddon', $detected), 'error')), 'permcheck');
      }
code_tokens: public function selected_plugintype_mismatch ( $ detected ) { $ mform = $ this -> _form ; $ mform -> addRule ( 'plugintype' , get_string ( 'required' ) , 'required' , null , 'client' ) ; $ mform -> setAdvanced ( 'plugintype' , false ) ; $ mform -> setAdvanced ( 'permcheck' , false ) ; $ mform -> insertElementBefore ( $ mform -> createElement ( 'static' , 'selectedplugintypemismatch' , '' , html_writer :: span ( get_string ( 'typedetectionmismatch' , 'tool_installaddon' , $ detected ) , 'error' ) ) , 'permcheck' ) ; }
docstring: Warn that the selected plugin type does not match the detected one.
  
  @param string $detected detected plugin type
docstring_tokens: Warn that the selected plugin type does not match the detected one .