weekly release 2.2dev
[moodle.git] / mod / feedback / item / captcha / captcha_form.php
CommitLineData
6ee09cfe 1<?php
2
a627a9c1 3require_once($CFG->dirroot.'/mod/feedback/item/feedback_item_form_class.php');
6ee09cfe 4
a627a9c1 5class feedback_captcha_form extends feedback_item_form {
6ee09cfe 6 var $type = "captcha";
1adbd2c3 7
6ee09cfe 8 function definition() {
a59ff6b0
AG
9
10 $item = $this->_customdata['item'];
11 $common = $this->_customdata['common'];
12 $positionlist = $this->_customdata['positionlist'];
13 $position = $this->_customdata['position'];
14
6ee09cfe 15 $mform =& $this->_form;
1adbd2c3 16
6ee09cfe 17 $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
a59ff6b0
AG
18 $mform->addElement('checkbox', 'required', get_string('required', 'feedback'));
19 $mform->addElement('text', 'name', get_string('item_name', 'feedback'), array('size="'.FEEDBACK_ITEM_NAME_TEXTBOX_SIZE.'"','maxlength="255"'));
20 $mform->addElement('text', 'label', get_string('item_label', 'feedback'), array('size="'.FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE.'"','maxlength="255"'));
1adbd2c3 21
a59ff6b0
AG
22 $mform->addElement('select',
23 'presentation',
24 get_string('count_of_nums', 'feedback').'&nbsp;',
25 array_slice(range(0,10),3,10,true));
1adbd2c3 26
5e97c34d 27 parent::definition();
a59ff6b0 28 $this->set_data($item);
51859310 29
6ee09cfe 30 }
31}
1adbd2c3 32