Differences Between: [Versions 310 and 311] [Versions 39 and 311]
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 /** 18 * Form for grade history filters 19 * 20 * @package gradereport_history 21 * @copyright 2013 NetSpot Pty Ltd (https://www.netspot.com.au) 22 * @author Adam Olley <adam.olley@netspot.com.au> 23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 */ 25 26 namespace gradereport_history; 27 28 defined('MOODLE_INTERNAL') || die; 29 30 require_once($CFG->libdir.'/formslib.php'); 31 32 /** 33 * Form for grade history filters 34 * 35 * @since Moodle 2.8 36 * @package gradereport_history 37 * @copyright 2013 NetSpot Pty Ltd (https://www.netspot.com.au) 38 * @author Adam Olley <adam.olley@netspot.com.au> 39 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 40 */ 41 class filter_form extends \moodleform { 42 43 /** 44 * Definition of the Mform for filters displayed in the report. 45 */ 46 public function definition() { 47 48 $mform = $this->_form; 49 $course = $this->_customdata['course']; 50 $itemids = $this->_customdata['itemids']; 51 $graders = $this->_customdata['graders']; 52 $userbutton = $this->_customdata['userbutton']; 53 $userfullnames = $this->_customdata['userfullnames']; 54 $names = \html_writer::span($userfullnames, 'selectednames'); 55 56 $mform->addElement('static', 'userselect', get_string('selectusers', 'gradereport_history'), $userbutton); 57 $mform->addElement('static', 'selectednames', get_string('selectedusers', 'gradereport_history'), $names); 58 59 $mform->addElement('select', 'itemid', get_string('gradeitem', 'grades'), $itemids); 60 $mform->setType('itemid', PARAM_INT); 61 62 $mform->addElement('select', 'grader', get_string('grader', 'gradereport_history'), $graders); 63 $mform->setType('grader', PARAM_INT); 64 65 $mform->addElement('date_selector', 'datefrom', get_string('datefrom', 'gradereport_history'), array('optional' => true)); 66 $mform->addElement('date_selector', 'datetill', get_string('dateto', 'gradereport_history'), array('optional' => true)); 67 68 $mform->addElement('checkbox', 'revisedonly', get_string('revisedonly', 'gradereport_history')); 69 $mform->addHelpButton('revisedonly', 'revisedonly', 'gradereport_history'); 70 71 $mform->addElement('hidden', 'id', $course->id); 72 $mform->setType('id', PARAM_INT); 73 74 $mform->addElement('hidden', 'userids'); 75 $mform->setType('userids', PARAM_SEQUENCE); 76 77 $mform->addElement('hidden', 'userfullnames'); 78 $mform->setType('userfullnames', PARAM_TEXT); 79 80 // Add a submit button. 81 $mform->addElement('submit', 'submitbutton', get_string('submit')); 82 } 83 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body