Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
require_once($CFG->dirroot.'/mod/feedback/item/feedback_item_form_class.php');
18
 
19
class feedback_label_form extends feedback_item_form {
20
    protected $type = "label";
21
    private $area;
22
 
23
    public function definition() {
24
        global $CFG;
25
 
26
        $item = $this->_customdata['item'];
27
        $common = $this->_customdata['common'];
28
        $presentationoptions = $this->_customdata['presentationoptions'];
29
        $positionlist = $this->_customdata['positionlist'];
30
        $position = $this->_customdata['position'];
31
 
32
        $mform =& $this->_form;
33
 
34
        $mform->addElement('hidden', 'required', 0);
35
        $mform->setType('required', PARAM_INT);
36
        $mform->addElement('hidden', 'name', 'label');
37
        $mform->setType('template', PARAM_ALPHA);
38
        $mform->addElement('hidden', 'label', '');
39
        $mform->setType('label', PARAM_ALPHA);
40
 
41
        $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
42
        $mform->addElement('editor', 'presentation_editor', get_string('labelcontents', 'feedback'), null, $presentationoptions);
43
        $mform->setType('presentation_editor', PARAM_RAW);
44
 
45
        parent::definition();
46
        $this->set_data($item);
47
 
48
    }
49
 
50
}
51