protected function definition()
 {
     global $path;
     $mform = $this->_form;
     $mform->addElement('header', '');
     $mform->addElement('textarea', 'path', get_string('path', 'local_moodlecheck'), array('rows' => 8, 'cols' => 120));
     $mform->addHelpButton('path', 'path', 'local_moodlecheck');
     $mform->addElement('textarea', 'ignorepath', get_string('ignorepath', 'local_moodlecheck'), array('rows' => 3, 'cols' => 120));
     $mform->setAdvanced('ignorepath');
     $mform->addElement('radio', 'checkall', '', get_string('checkallrules', 'local_moodlecheck'), 'all');
     $mform->addElement('radio', 'checkall', '', get_string('checkselectedrules', 'local_moodlecheck'), 'selected');
     $mform->setDefault('checkall', 'all');
     foreach (local_moodlecheck_registry::get_registered_rules() as $code => $rule) {
         $mform->addElement('checkbox', "rule[{$code}]", '', $rule->get_name());
         $mform->setDefault("rule[{$code}]", 1);
         $mform->setAdvanced("rule[{$code}]");
     }
     $mform->addElement('submit', 'submitbutton', get_string('check', 'local_moodlecheck'));
 }