Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/feedback/item/info/info_form.php
Go to the documentation of this file.
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_info_form extends feedback_item_form {
00020     protected $type = "info";
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('hidden', 'required', 0);
00033         $mform->setType('required', PARAM_INT);
00034 
00035         $mform->addElement('text',
00036                             'name',
00037                             get_string('item_name', 'feedback'),
00038                             array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
00039         $mform->addElement('text',
00040                             'label',
00041                             get_string('item_label', 'feedback'),
00042                             array('size'=>FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE, 'maxlength'=>255));
00043 
00044         $options=array();
00045         $options[1]  = get_string('responsetime', 'feedback');
00046         $options[2]  = get_string('course');
00047         $options[3]  = get_string('coursecategory');
00048         $this->infotype = &$mform->addElement('select',
00049                                               'presentation',
00050                                               get_string('infotype', 'feedback'),
00051                                               $options);
00052 
00053         parent::definition();
00054         $this->set_data($item);
00055 
00056     }
00057 }
00058 
 All Data Structures Namespaces Files Functions Variables Enumerations