1 |
efrain |
1 |
<?php
|
|
|
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 |
|
|
|
17 |
/**
|
|
|
18 |
* Setting page for questionaire module
|
|
|
19 |
*
|
|
|
20 |
* @package mod_questionnaire
|
|
|
21 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
22 |
* @copyright 2016 onward Mike Churchward (mike.churchward@poetgroup.org)
|
|
|
23 |
* @author Mike Churchward
|
|
|
24 |
*/
|
|
|
25 |
|
|
|
26 |
defined('MOODLE_INTERNAL') || die;
|
|
|
27 |
|
|
|
28 |
if ($ADMIN->fulltree) {
|
|
|
29 |
$options = array(0 => get_string('no'), 1 => get_string('yes'));
|
|
|
30 |
$str = get_string('configusergraphlong', 'questionnaire');
|
|
|
31 |
$settings->add(new admin_setting_configselect('questionnaire/usergraph',
|
|
|
32 |
get_string('configusergraph', 'questionnaire'),
|
|
|
33 |
$str, 0, $options));
|
|
|
34 |
$settings->add(new admin_setting_configtext('questionnaire/maxsections',
|
|
|
35 |
get_string('configmaxsections', 'questionnaire'),
|
|
|
36 |
'', 10, PARAM_INT));
|
|
|
37 |
$choices = array(
|
|
|
38 |
'response' => get_string('response', 'questionnaire'),
|
|
|
39 |
'submitted' => get_string('submitted', 'questionnaire'),
|
|
|
40 |
'institution' => get_string('institution'),
|
|
|
41 |
'department' => get_string('department'),
|
|
|
42 |
'course' => get_string('course'),
|
|
|
43 |
'group' => get_string('group'),
|
|
|
44 |
'id' => get_string('id', 'questionnaire'),
|
|
|
45 |
'fullname' => get_string('fullname'),
|
|
|
46 |
'username' => get_string('username')
|
|
|
47 |
);
|
|
|
48 |
|
|
|
49 |
$settings->add(new admin_setting_configmultiselect('questionnaire/downloadoptions',
|
|
|
50 |
get_string('textdownloadoptions', 'questionnaire'), '', array_keys($choices), $choices));
|
|
|
51 |
|
|
|
52 |
$settings->add(new admin_setting_configcheckbox('questionnaire/allowemailreporting',
|
|
|
53 |
get_string('configemailreporting', 'questionnaire'), get_string('configemailreportinglong', 'questionnaire'), 0));
|
|
|
54 |
}
|