MDL-42609 course: management default missing bits
[moodle.git] / course / editcategory_form.php
CommitLineData
aa6c1ced 1<?php
5dc361e1
SH
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/>.
bfebaf64 16
5dc361e1
SH
17/**
18 * Edit category form.
19 *
20 * This file and class have been deprecated, the form has been renamed to core_course_editcategory_form and is not autoloaded when
21 * first used. Please update your code to use this new form.
22 *
23 * @deprecated since 2.6
24 * @todo remove in 2.7 MDL-41502
25 *
26 * @package core_course
27 * @copyright 2002 onwards Martin Dougiamas (http://dougiamas.com)
28 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
29 */
1f682581 30
5dc361e1 31defined('MOODLE_INTERNAL') || die;
8ed5dd63 32
5dc361e1 33debugging('Please update your code to use core_course_editcategory_form (autloaded). This file will be removed in 2.7');
8ed5dd63 34
5dc361e1
SH
35/**
36 * Class editcategory_form.
37 *
38 * This file and class have been deprecated, the form has been renamed to core_course_editcategory_form and is not autoloaded when
39 * first used. Please update your code to use this new form.
40 *
41 * @deprecated since 2.6
42 * @todo remove in 2.7 MDL-41502
43 * @package core_course
44 * @copyright 2002 onwards Martin Dougiamas (http://dougiamas.com)
45 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
46 */
47class editcategory_form extends core_course_editcategory_form {
8ed5dd63 48
5dc361e1
SH
49 /**
50 * Constructs the form.
51 * @param null $action
52 * @param null $customdata
53 * @param string $method
54 * @param string $target
55 * @param null $attributes
56 * @param bool $editable
57 */
58 public function __construct($action = null, $customdata = null, $method = 'post', $target = '', $attributes = null,
59 $editable = true) {
60 $customdata['categoryid'] = $customdata['category']->id;
61 $customdata['parent'] = $customdata['category']->parent;
62 unset($customdata['category']);
63 parent::moodleform($action, $customdata, $method, $target, $attributes, $editable);
83cd9b16 64 }
aa6c1ced 65
5dc361e1 66};