MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / mod / data / comment_form.php
blob6a639a79d0a75ee1daa60d10e4be7d373d223a15
1 <?php //$Id$
3 require_once $CFG->libdir.'/formslib.php';
5 class mod_data_comment_form extends moodleform {
6 function definition() {
7 $mform =& $this->_form;
9 // visible elements
10 $mform->addElement('htmleditor', 'content', get_string('comment', 'data'), array('cols'=>85, 'rows'=>18));
11 $mform->addRule('content', get_string('required'), 'required', null, 'client');
12 $mform->setType('content', PARAM_RAW); // cleaned before the display
14 $mform->addElement('format', 'format', get_string('format'));
15 $mform->setHelpButton('format', array('textformat', get_string('helpformatting')));
17 // hidden optional params
18 $mform->addElement('hidden', 'mode', 'add');
19 $mform->setType('mode', PARAM_ALPHA);
21 $mform->addElement('hidden', 'page', 0);
22 $mform->setType('page', PARAM_INT);
24 $mform->addElement('hidden', 'rid', 0);
25 $mform->setType('rid', PARAM_INT);
27 $mform->addElement('hidden', 'commentid', 0);
28 $mform->setType('commentid', PARAM_INT);
30 //-------------------------------------------------------------------------------
31 // buttons
32 $this->add_action_buttons();