MDL-31873 added mod_assign_get_grades web service function
[moodle.git] / grade / grading / pick_form.php
CommitLineData
20836db9
DM
1<?php
2
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.
14//
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/>.
17
18/**
4d064218 19 * Defines forms used by pick.php
20836db9
DM
20 *
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
25 */
26
27defined('MOODLE_INTERNAL') || die();
28
29require_once($CFG->dirroot.'/lib/formslib.php');
30
31/**
32 * Allows to search for a specific shared template
33 */
34class grading_search_template_form extends moodleform {
35
36 /**
37 * Pretty simple search box
38 */
39 public function definition() {
40 $mform = $this->_form;
967d346f
DM
41 $mform->addElement('header', 'searchheader', get_string('searchtemplate', 'core_grading'));
42 $mform->addHelpButton('searchheader', 'searchtemplate', 'core_grading');
20836db9 43 $mform->addGroup(array(
967d346f 44 $mform->createElement('checkbox', 'mode', '', get_string('searchownforms', 'core_grading')),
20836db9
DM
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);
50 }
51}