2 // This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 * prints the form to confirm use template
20 * @author Andreas Grabs
21 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
22 * @package mod_feedback
25 if (!defined('MOODLE_INTERNAL')) {
26 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
29 require_once($CFG->libdir
.'/formslib.php');
32 * The mod_feedback_use_templ_form
34 * @deprecated since 4.0. New dynamic forms have been created instead.
36 class mod_feedback_use_templ_form
extends moodleform
{
37 public function __construct($action = null, $customdata = null, $method = 'post', $target = '',
38 $attributes = null, $editable = true, $ajaxformdata = null) {
39 debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER
);
40 parent
::__construct($action, $customdata, $method, $target, $attributes, $editable, $ajaxformdata);
43 public function definition() {
44 $mform =& $this->_form
;
47 $mform->addElement('radio', 'deleteolditems', '', get_string('delete_old_items', 'feedback'), 1);
48 $mform->addElement('radio', 'deleteolditems', '', get_string('append_new_items', 'feedback'), 0);
49 $mform->setType('deleteolditems', PARAM_INT
);
50 $mform->setDefault('deleteolditems', 1);
53 $mform->addElement('hidden', 'id');
54 $mform->setType('id', PARAM_INT
);
55 $mform->addElement('hidden', 'templateid');
56 $mform->setType('templateid', PARAM_INT
);
57 $mform->addElement('hidden', 'do_show');
58 $mform->setType('do_show', PARAM_INT
);
59 $mform->setConstant('do_show', 'edit');
61 //-------------------------------------------------------------------------------
63 $this->add_action_buttons();
68 * Overrides parent static method for deprecation purposes.
70 * @deprecated since 4.0
73 public static function get_js_module() {
74 debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER
);
75 return parent
::get_js_module();
79 * Overrides parent static method for deprecation purposes.
81 * @deprecated since 4.0
82 * @param array $simulatedsubmitteddata
83 * @param array $simulatedsubmittedfiles
84 * @param string $method
85 * @param null $formidentifier
88 public static function mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
89 $method = 'post', $formidentifier = null) {
90 debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER
);
91 return parent
::mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);
95 * Overrides parent static method for deprecation purposes.
97 * @deprecated since 4.0
101 public static function mock_generate_submit_keys($data = []) {
102 debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER
);
103 return parent
::mock_generate_submit_keys($data);
107 * Overrides parent static method for deprecation purposes.
109 * @deprecated since 4.0
110 * @param array $simulatedsubmitteddata
111 * @param array $simulatedsubmittedfiles
112 * @param string $method
113 * @param null $formidentifier
115 public static function mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
116 $method = 'post', $formidentifier = null) {
117 debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER
);
118 parent
::mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);