Merge branch 'MDL-70242-310' of git://github.com/marinaglancy/moodle into MOODLE_310_...
[moodle.git] / question / type / description / edit_description_form.php
CommitLineData
aeb15530 1<?php
fe6ce234
DC
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
271ffe3f 17/**
18 * Defines the editing form for the description question type.
19 *
b04a4319 20 * @package qtype
32d8935c 21 * @subpackage description
b04a4319
TH
22 * @copyright 2007 Jamie Pratt
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
271ffe3f 24 */
25
32d8935c 26
a17b297d
TH
27defined('MOODLE_INTERNAL') || die();
28
29
271ffe3f 30/**
32d8935c 31 * Description editing form definition.
b04a4319
TH
32 *
33 * @copyright 2007 Jamie Pratt
34 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
271ffe3f 35 */
6e34cd29 36class qtype_description_edit_form extends question_edit_form {
271ffe3f 37 /**
38 * Add question-type specific form fields.
39 *
40 * @param MoodleQuickForm $mform the form being built.
41 */
32d8935c
TH
42 protected function definition_inner($mform) {
43 // We don't need this default element.
44 $mform->removeElement('defaultmark');
45 $mform->addElement('hidden', 'defaultmark', 0);
46 $mform->setType('defaultmark', PARAM_RAW);
271ffe3f 47 }
48
32d8935c 49 public function qtype() {
271ffe3f 50 return 'description';
51 }
271ffe3f 52}