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 18 $mform->addElement('checkbox', 'required', get_string('required', 'feedback'));
af26e345
AG
19 $mform->addElement('text',
20 'name',
21 get_string('item_name', 'feedback'),
22 array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
23 $mform->addElement('text',
24 'label',
25 get_string('item_label', 'feedback'),
26 array('size'=>FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE, 'maxlength'=>255));
1adbd2c3 27
a59ff6b0
AG
28 $mform->addElement('select',
29 'presentation',
30 get_string('count_of_nums', 'feedback').'&nbsp;',
31 array_slice(range(0,10),3,10,true));
1adbd2c3 32
5e97c34d 33 parent::definition();
a59ff6b0 34 $this->set_data($item);
51859310 35
6ee09cfe 36 }
37}
1adbd2c3 38