public function require_explicit_plugintype() {

        $mform = $this->_form;

        $mform->addRule('plugintype', get_string('required'), 'required', null, 'client');
        $mform->setAdvanced('plugintype', false);
        $mform->setAdvanced('permcheck', false);

        $typedetectionfailed = $mform->createElement('static', 'typedetectionfailed', '',
            html_writer::span(get_string('typedetectionfailed', 'tool_installaddon'), 'error'));
        $mform->insertElementBefore($typedetectionfailed, 'permcheck');
    }