weekly release 2.2.7+
[moodle.git] / grade / grading / pick_form.php
blob2498942dcf401f1f0db3ecbfa0adc7fe24b3ad4b
1 <?php
3 // This file is part of Moodle - http://moodle.org/
4 //
5 // Moodle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // Moodle is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 /**
19 * Defines forms used by pick.php
21 * @package core
22 * @subpackage grading
23 * @copyright 2011 David Mudrak <david@moodle.com>
24 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27 defined('MOODLE_INTERNAL') || die();
29 require_once($CFG->dirroot.'/lib/formslib.php');
31 /**
32 * Allows to search for a specific shared template
34 class grading_search_template_form extends moodleform {
36 /**
37 * Pretty simple search box
39 public function definition() {
40 $mform = $this->_form;
41 $mform->addElement('header', 'searchheader', get_string('searchtemplate', 'core_grading'));
42 $mform->addHelpButton('searchheader', 'searchtemplate', 'core_grading');
43 $mform->addGroup(array(
44 $mform->createElement('checkbox', 'mode', '', get_string('searchownforms', 'core_grading')),
45 $mform->createElement('text', 'needle', '', array('size' => 30)),
46 $mform->createElement('submit', 'submitbutton', get_string('search')),
47 ), 'buttonar', '', array(' '), false);
48 $mform->setType('needle', PARAM_TEXT);
49 $mform->setType('buttonar', PARAM_RAW);