|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // This file is part of Moodle - http://moodle.org/ 00003 // 00004 // Moodle is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // Moodle is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 00016 00017 require_once($CFG->dirroot.'/mod/feedback/item/feedback_item_form_class.php'); 00018 00019 class feedback_captcha_form extends feedback_item_form { 00020 protected $type = "captcha"; 00021 00022 public function definition() { 00023 00024 $item = $this->_customdata['item']; 00025 $common = $this->_customdata['common']; 00026 $positionlist = $this->_customdata['positionlist']; 00027 $position = $this->_customdata['position']; 00028 00029 $mform =& $this->_form; 00030 00031 $mform->addElement('header', 'general', get_string($this->type, 'feedback')); 00032 $mform->addElement('checkbox', 'required', get_string('required', 'feedback')); 00033 $mform->addElement('text', 00034 'name', 00035 get_string('item_name', 'feedback'), 00036 array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255)); 00037 $mform->addElement('text', 00038 'label', 00039 get_string('item_label', 'feedback'), 00040 array('size'=>FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE, 'maxlength'=>255)); 00041 00042 $mform->addElement('select', 00043 'presentation', 00044 get_string('count_of_nums', 'feedback').' ', 00045 array_slice(range(0, 10), 3, 10, true)); 00046 00047 parent::definition(); 00048 $this->set_data($item); 00049 00050 } 00051 } 00052