|
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_label_form extends feedback_item_form { 00020 protected $type = "label"; 00021 private $area; 00022 00023 public function definition() { 00024 global $CFG; 00025 00026 $item = $this->_customdata['item']; 00027 $common = $this->_customdata['common']; 00028 $presentationoptions = $this->_customdata['presentationoptions']; 00029 $positionlist = $this->_customdata['positionlist']; 00030 $position = $this->_customdata['position']; 00031 00032 $context = get_context_instance(CONTEXT_MODULE, $common['cmid']); 00033 00034 $mform =& $this->_form; 00035 00036 $mform->addElement('hidden', 'required', 0); 00037 $mform->setType('required', PARAM_INT); 00038 $mform->addElement('hidden', 'name', 'label'); 00039 $mform->setType('template', PARAM_ALPHA); 00040 $mform->addElement('hidden', 'label', '-'); 00041 $mform->setType('label', PARAM_ALPHA); 00042 00043 $mform->addElement('header', 'general', get_string($this->type, 'feedback')); 00044 $mform->addElement('editor', 'presentation_editor', '', null, $presentationoptions); 00045 $mform->setType('presentation_editor', PARAM_CLEANHTML); 00046 00047 parent::definition(); 00048 $this->set_data($item); 00049 00050 } 00051 00052 } 00053