mod_form.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. if (!defined('MOODLE_INTERNAL')) {
  3. die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
  4. }
  5. require_once($CFG->dirroot.'/course/moodleform_mod.php');
  6. require_once($CFG->dirroot.'/mod/gradeImporter/lib.php');
  7. class mod_gradeImporter_mod_form extends moodleform_mod {
  8. function definition() {
  9. global $CFG, $DB, $OUTPUT;
  10. $mform =& $this->_form;
  11. $mform->addElement('text', 'name', get_string('moduleName', 'mod_gradeImporter'), array('size'=>'64'));
  12. $mform->setType('name', PARAM_TEXT);
  13. $mform->addRule('name', null, 'required', null, 'client');
  14. $ynoptions = array(0 => get_string('no'),
  15. 1 => get_string('yes'));
  16. $mform->addElement('select', 'usecode', 'USE CODE', $ynoptions);
  17. $mform->setDefault('usecode', 0);
  18. $mform->addHelpButton('usecode', 'usecode', 'certificate');
  19. $this->standard_coursemodule_elements();
  20. $this->add_action_buttons();
  21. }
  22. }
  23. ?>