MDL-28653 question output. Add a class to the main div based on question state.
[moodle.git] / mod / feedback / use_templ_form.php
blob75adb62277e08a17e8b60805dd0410035f8b3b3f
1 <?php
2 /**
3 * prints the form to confirm use template
5 * @author Andreas Grabs
6 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
7 * @package feedback
8 */
10 if (!defined('MOODLE_INTERNAL')) {
11 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
14 require_once $CFG->libdir.'/formslib.php';
16 class mod_feedback_use_templ_form extends moodleform {
17 function definition() {
18 $mform =& $this->_form;
20 //headline
21 $mform->addElement('header', 'general', '');
23 // visible elements
24 $mform->addElement('radio', 'deleteolditems', '1)', get_string('delete_old_items', 'feedback'), 1);
25 $mform->addElement('radio', 'deleteolditems', '2)', get_string('append_new_items', 'feedback'), 0);
26 $mform->setType('deleteolditems', PARAM_INT);
28 // hidden elements
29 $mform->addElement('hidden', 'id');
30 $mform->setType('id', PARAM_INT);
31 $mform->addElement('hidden', 'templateid');
32 $mform->setType('templateid', PARAM_INT);
33 $mform->addElement('hidden', 'do_show');
34 $mform->setType('do_show', PARAM_INT);
35 $mform->addElement('hidden', 'confirmadd');
36 $mform->setType('confirmadd', PARAM_INT);
38 //-------------------------------------------------------------------------------
39 // buttons
40 $this->add_action_buttons();