Search moodle.org's
Developer Documentation


  • Bug fixes for general core bugs in 2.8.x ended 9 November 2015 (12 months).
  • Bug fixes for security issues in 2.8.x ended 9 May 2016 (18 months).
  • minimum PHP 5.4.4 (always use latest PHP 5.4.x or 5.5.x on Windows - http://windows.php.net/download/), PHP 7 is NOT supported
  • Differences Between: [Versions 28 and 31] [Versions 28 and 32] [Versions 28 and 33] [Versions 28 and 34] [Versions 28 and 35] [Versions 28 and 36] [Versions 28 and 37]

       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', '', null, $presentationoptions);
      43          $mform->setType('presentation_editor', PARAM_RAW);
      44  
      45          parent::definition();
      46          $this->set_data($item);
      47  
      48      }
      49  
      50  }
      51  
    

    Search This Site: