moodle-expcontent/mod_form.php

31 lines
912 B
PHP

<?php
if (!defined('MOODLE_INTERNAL')) die();
require_once($CFG->dirroot.'/course/moodleform_mod.php');
require_once($CFG->dirroot.'/mod/expcontent/lib.php');
class mod_expcontent_mod_form extends moodleform_mod {
function definition() {
global $CFG, $DB, $OUTPUT;
$mform =& $this->_form;
$mform->addElement('text', 'name', get_string('name', 'expcontent'), array('size'=>'64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('text', 'contentid', get_string('contentid', 'expcontent'), array('size'=>'64'));
$mform->setType('contentid', PARAM_TEXT);
$mform->addRule('contentid', null, 'required', null, 'client');
$this->standard_intro_elements();
$this->standard_coursemodule_elements();
$this->add_action_buttons();
}
}