mirror of
https://github.com/moodle/moodle.git
synced 2025-03-09 10:19:56 +01:00
merge the items dropdownrated, radiorated to multiplechoicerated item the creating or editing of an item now use the formslib
33 lines
1.2 KiB
PHP
33 lines
1.2 KiB
PHP
<?php
|
|
|
|
require_once $CFG->libdir.'/formslib.php';
|
|
|
|
class feedback_textarea_form extends moodleform {
|
|
var $type = "textarea";
|
|
var $requiredcheck;
|
|
var $itemname;
|
|
var $selectwith;
|
|
var $selectheight;
|
|
|
|
function definition() {
|
|
$mform =& $this->_form;
|
|
|
|
$mform->addElement('header', 'general', get_string($this->type, 'feedback'));
|
|
$this->requiredcheck = $mform->addElement('checkbox', 'required', get_string('required', 'feedback'));
|
|
|
|
$this->itemname = $mform->addElement('text', 'itemname', get_string('item_name', 'feedback'), array('size="40"','maxlength="255"'));
|
|
|
|
$this->selectwith = $mform->addElement('select',
|
|
'itemwidth',
|
|
get_string('textarea_width', 'feedback').' ',
|
|
array_slice(range(0,80),5,80,true));
|
|
|
|
$this->selectheight = $mform->addElement('select',
|
|
'itemheight',
|
|
get_string('textarea_height', 'feedback').' ',
|
|
array_slice(range(0,40),5,40,true));
|
|
|
|
}
|
|
}
|
|
?>
|