2009-11-01 14:55:15 +00:00
|
|
|
<?php
|
2011-10-28 00:30:42 +02:00
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2008-04-23 09:33:54 +00:00
|
|
|
/**
|
2011-10-28 00:30:42 +02:00
|
|
|
* prints the form to confirm use template
|
|
|
|
*
|
|
|
|
* @author Andreas Grabs
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
|
|
|
* @package feedback
|
|
|
|
*/
|
2008-04-23 09:33:54 +00:00
|
|
|
|
2010-05-13 02:02:05 +00:00
|
|
|
if (!defined('MOODLE_INTERNAL')) {
|
|
|
|
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
|
|
|
}
|
|
|
|
|
2011-10-28 00:30:42 +02:00
|
|
|
require_once($CFG->libdir.'/formslib.php');
|
2008-04-23 09:33:54 +00:00
|
|
|
|
|
|
|
class mod_feedback_use_templ_form extends moodleform {
|
2011-10-28 00:30:42 +02:00
|
|
|
public function definition() {
|
2008-04-23 09:33:54 +00:00
|
|
|
$mform =& $this->_form;
|
|
|
|
|
|
|
|
//headline
|
|
|
|
$mform->addElement('header', 'general', '');
|
2009-11-01 14:55:15 +00:00
|
|
|
|
2008-04-23 09:33:54 +00:00
|
|
|
// visible elements
|
2010-05-02 12:00:56 +00:00
|
|
|
$mform->addElement('radio', 'deleteolditems', '1)', get_string('delete_old_items', 'feedback'), 1);
|
|
|
|
$mform->addElement('radio', 'deleteolditems', '2)', get_string('append_new_items', 'feedback'), 0);
|
2008-04-23 09:33:54 +00:00
|
|
|
$mform->setType('deleteolditems', PARAM_INT);
|
|
|
|
|
|
|
|
// hidden elements
|
|
|
|
$mform->addElement('hidden', 'id');
|
2009-09-26 17:07:08 +00:00
|
|
|
$mform->setType('id', PARAM_INT);
|
2008-04-23 09:33:54 +00:00
|
|
|
$mform->addElement('hidden', 'templateid');
|
2009-09-26 17:07:08 +00:00
|
|
|
$mform->setType('templateid', PARAM_INT);
|
2008-04-23 09:33:54 +00:00
|
|
|
$mform->addElement('hidden', 'do_show');
|
2009-09-26 17:07:08 +00:00
|
|
|
$mform->setType('do_show', PARAM_INT);
|
2008-04-23 09:33:54 +00:00
|
|
|
$mform->addElement('hidden', 'confirmadd');
|
2009-09-26 17:07:08 +00:00
|
|
|
$mform->setType('confirmadd', PARAM_INT);
|
2008-04-23 09:33:54 +00:00
|
|
|
|
|
|
|
//-------------------------------------------------------------------------------
|
|
|
|
// buttons
|
|
|
|
$this->add_action_buttons();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2009-11-01 14:55:15 +00:00
|
|
|
|