1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- defined('MOODLE_INTERNAL') || die();
- require_once($CFG->dirroot.'/course/moodleform_mod.php');
- require_once($CFG->dirroot.'/mod/gradeimporter/lib.php');
- class mod_gradeimporter_mod_form extends moodleform_mod {
- public function definition() {
- global $CFG, $COURSE, $USER, $DB, $OUTPUT;
- $mform =& $this->_form;
- $coursemodulesid = optional_param('update', 0, PARAM_INT);
-
- $mform->addElement('header', 'general', get_string('general', 'gradeimporter'));
-
- $mform->addElement('text', 'name', get_string('name', 'gradeimporter'), array('size' => '64',
- 'maxlength' => "256")
- );
- $mform->setType('name', PARAM_TEXT);
- $mform->addRule('name', get_string('error_nameField', 'gradeimporter'), 'required', null, 'client');
-
- $this->standard_intro_elements(get_string('description', 'gradeimporter'));
- $features = array('groups' => false, 'groupings' => false,
- 'groupmembersonly' => false, 'outcomes' => false,
- 'gradecat' => false, 'idnumber' => false
- );
- $this->standard_coursemodule_elements($features);
-
- $mform->addElement('hidden', 'action');
- $mform->setType('action', PARAM_TEXT);
- $mform->addElement('hidden', 'id');
- $mform->setType('id', PARAM_TEXT);
- $mform->addElement('hidden', 'author_name');
- $mform->setType('author_name', PARAM_TEXT);
- $mform->addElement('hidden', 'author_modified_name');
- $mform->setType('author_modified_name', PARAM_TEXT);
- $mform->addElement('hidden', 'timecreated');
- $mform->setType('timecreated', PARAM_TEXT);
- $mform->addElement('hidden', 'position');
- $mform->setType('position', PARAM_TEXT);
- $this->add_action_buttons();
- }
- }
|