-
Notifications
You must be signed in to change notification settings - Fork 2
/
settings.php
138 lines (118 loc) · 5.53 KB
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
// 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/>.
/**
* This file defines the admin settings for this plugin
*
* @package assignsubmission_filero
* @copyright 2023 DHBW {@link https://DHBW.de/}
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3 or later
* @author Harry@Bleckert.com für LIB-IT DMS GmbH {@link https://www.LIB-IT.de/}
*/
$settings->add(new admin_setting_configcheckbox('assignsubmission_filero/default',
new lang_string('default', 'assignsubmission_filero'),
new lang_string('default_help', 'assignsubmission_filero'), 0));
// override assign settings if activated
$name = new lang_string('use_archiving', 'assignsubmission_filero');
$description = new lang_string('use_archiving_help', 'assignsubmission_filero');
$element = new admin_setting_configcheckbox('assignsubmission_filero/use_archiving',
$name,
$description,
1);
$settings->add($element);
$element = new admin_setting_configtext('assignsubmission_filero/location',
'location',
new lang_string('location', 'assignsubmission_filero'),
"https://10.20.58.10/csp/fileroapi//FLC.PKG.Moodle.Soap.Api.cls", PARAM_RAW, 120);
$settings->add($element);
$element = new admin_setting_configtext('assignsubmission_filero/username',
'username',
new lang_string('username', 'assignsubmission_filero'),
"", PARAM_TEXT);
$settings->add($element);
$element = new admin_setting_configtext('assignsubmission_filero/password',
'password',
new lang_string('password', 'assignsubmission_filero'),
"", PARAM_TEXT);
$settings->add($element);
$element = new admin_setting_configtext('assignsubmission_filero/productkey',
'productkey',
new lang_string('productkey', 'assignsubmission_filero'),
"", PARAM_TEXT);
$settings->add($element);
// override assign settings if activated
$name = new lang_string('requiresubmissionstatement', 'mod_assign');
$description = new lang_string('requiresubmissionstatement_help', 'mod_assign');
$element = new admin_setting_configcheckbox('assignsubmission_filero/requiresubmissionstatement',
$name,
$description,
1);
$settings->add($element);
// override assign settings if activated
$name = new lang_string('multiple_graders', 'assignsubmission_filero');
$description = new lang_string('multiple_graders_help', 'assignsubmission_filero');
$element = new admin_setting_configcheckbox('assignsubmission_filero/multiple_graders',
$name,
$description,
1);
$settings->add($element);
$name = new lang_string('submission_title_tag', 'assignsubmission_filero');
$description = new lang_string('submission_title_tag_help', 'assignsubmission_filero');
$defaultv = new lang_string('exam_submission', 'assignsubmission_filero');
$element = new admin_setting_configtext('assignsubmission_filero/submission_title_tag',
$name,
$description,
$defaultv, PARAM_TEXT);
$settings->add($element);
$name = new lang_string('grading_title_tag', 'assignsubmission_filero');
$description = new lang_string('grading_title_tag_help', 'assignsubmission_filero');
$defaultv = new lang_string('exam_grading', 'assignsubmission_filero');
$element = new admin_setting_configtext('assignsubmission_filero/grading_title_tag',
$name,
$description,
$defaultv, PARAM_TEXT);
$settings->add($element);
global $DB;
$roles = $DB->get_records_sql("SELECT id,shortname FROM {role} WHERE id NOT IN(1,2,5,6,7,8,11) ORDER BY id asc");
$grader_roles = array();
foreach ( $roles as $role ){
$grader_roles[$role->id] = ucfirst(trim($role->shortname));
}
$name = new lang_string('grader_roles', 'assignsubmission_filero');
$description = new lang_string('grader_roles_help', 'assignsubmission_filero');
$element = new admin_setting_configmultiselect('assignsubmission_filero/grader_roles',
$name,
$description,
array("4"), $grader_roles);
$settings->add($element);
// Archive to Filero only AFTER grading has been recorded (assign_grades->grade >0)
$name = new lang_string('archive_feedback_after_grading', 'assignsubmission_filero');
$description = new lang_string('archive_feedback_after_grading_help', 'assignsubmission_filero');
$element = new admin_setting_configcheckbox('assignsubmission_filero/archive_feedback_after_grading',
$name,
$description,
1);
$settings->add($element);
// "multiple graders", title tag and roles of graders
// submissiondrafts = Abgabebestätigung. Muss immer gesetzt sein für Filero, sonst kein submit_for_grading
// wird über assignsubmission_filero_validate_settings() beim requir von locallib validiert und gesetzt
/* $name = new lang_string('submissiondrafts', 'mod_assign');
$description = new lang_string('submissiondrafts_help', 'mod_assign');
$setting = new admin_setting_configcheckbox('assignsubmission_filero/submissiondrafts',
$name,
$description,
1);
$settings->add($element);
*/