1 |
efrain |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
|
|
4 |
|
|
|
5 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enableoutcomes', new lang_string('enableoutcomes', 'grades'), new lang_string('enableoutcomes_help', 'grades'), 0));
|
|
|
6 |
$optionalsubsystems->add(new admin_setting_configcheckbox('usecomments', new lang_string('enablecomments', 'admin'), new lang_string('configenablecomments', 'admin'), 1));
|
|
|
7 |
|
|
|
8 |
$optionalsubsystems->add(new admin_setting_configcheckbox('usetags', new lang_string('usetags','admin'),new lang_string('configusetags', 'admin'), '1'));
|
|
|
9 |
|
|
|
10 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enablenotes', new lang_string('enablenotes', 'notes'), new lang_string('configenablenotes', 'notes'), 1));
|
|
|
11 |
|
|
|
12 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enableportfolios', new lang_string('enabled', 'portfolio'), new lang_string('enableddesc', 'portfolio'), 0));
|
|
|
13 |
|
|
|
14 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enablewebservices', new lang_string('enablewebservices', 'admin'), new lang_string('configenablewebservices', 'admin'), 0));
|
|
|
15 |
|
|
|
16 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enablestats', new lang_string('enablestats', 'admin'), new lang_string('configenablestats', 'admin'), 0));
|
|
|
17 |
|
|
|
18 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enablerssfeeds', new lang_string('enablerssfeeds', 'admin'), new lang_string('configenablerssfeeds', 'admin'), 0));
|
|
|
19 |
|
|
|
20 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enableblogs', new lang_string('enableblogs', 'admin'), new lang_string('configenableblogs', 'admin'), 1));
|
|
|
21 |
|
|
|
22 |
$options = array('off'=>new lang_string('off', 'mnet'), 'strict'=>new lang_string('on', 'mnet'));
|
|
|
23 |
$optionalsubsystems->add(new admin_setting_configselect('mnet_dispatcher_mode', new lang_string('net', 'mnet'), new lang_string('configmnet', 'mnet'), 'off', $options));
|
|
|
24 |
|
|
|
25 |
// Conditional activities: completion and availability
|
|
|
26 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
|
|
|
27 |
new lang_string('enablecompletion','completion'),
|
|
|
28 |
new lang_string('configenablecompletion', 'completion'), 1));
|
|
|
29 |
|
|
|
30 |
$options = array(
|
|
|
31 |
1 => get_string('completionactivitydefault', 'completion'),
|
|
|
32 |
|
|
|
33 |
);
|
|
|
34 |
|
|
|
35 |
$optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
|
|
|
36 |
new lang_string('enableavailability', 'availability'),
|
|
|
37 |
new lang_string('enableavailability_desc', 'availability'), 1));
|
|
|
38 |
$checkbox->set_affects_modinfo(true);
|
|
|
39 |
|
|
|
40 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', new lang_string('enableplagiarism','plagiarism'), new lang_string('configenableplagiarism','plagiarism'), 0));
|
|
|
41 |
|
|
|
42 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enablebadges', new lang_string('enablebadges', 'badges'), new lang_string('configenablebadges', 'badges'), 1));
|
|
|
43 |
|
|
|
44 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enableglobalsearch', new lang_string('enableglobalsearch', 'admin'),
|
|
|
45 |
new lang_string('enableglobalsearch_desc', 'admin'), 0, 1, 0));
|
|
|
46 |
|
|
|
47 |
$optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'),
|
|
|
48 |
new lang_string('allowstealthmodules_help'), 0, 1, 0));
|
|
|
49 |
|
|
|
50 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enableanalytics', new lang_string('enableanalytics', 'admin'),
|
|
|
51 |
new lang_string('configenableanalytics', 'admin'), 1, 1, 0));
|
|
|
52 |
|
|
|
53 |
$optionalsubsystems->add(new admin_setting_configcheckbox('core_competency/enabled',
|
|
|
54 |
new lang_string('enablecompetencies', 'core_competency'),
|
|
|
55 |
new lang_string('enablecompetencies_desc', 'core_competency'),
|
|
|
56 |
1)
|
|
|
57 |
);
|
|
|
58 |
|
|
|
59 |
$optionalsubsystems->add(new admin_setting_configcheckbox('messaging',
|
|
|
60 |
new lang_string('messaging', 'admin'),
|
|
|
61 |
new lang_string('configmessaging', 'admin'),
|
|
|
62 |
1)
|
|
|
63 |
);
|
|
|
64 |
|
|
|
65 |
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecustomreports',
|
|
|
66 |
new lang_string('enablecustomreports', 'core_reportbuilder'),
|
|
|
67 |
new lang_string('enablecustomreports_desc', 'core_reportbuilder'),
|
|
|
68 |
1
|
|
|
69 |
));
|
|
|
70 |
|
|
|
71 |
$fullunicodesupport = true;
|
|
|
72 |
if ($DB->get_dbfamily() == 'mysql') {
|
|
|
73 |
$collation = $DB->get_dbcollation();
|
|
|
74 |
$collationinfo = explode('_', $collation);
|
|
|
75 |
$charset = reset($collationinfo);
|
|
|
76 |
$fullunicodesupport = $charset === 'utf8mb4';
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
if ($fullunicodesupport) {
|
|
|
80 |
$optionalsubsystems->add(new admin_setting_configcheckbox(
|
|
|
81 |
'allowemojipicker',
|
|
|
82 |
new lang_string('allowemojipicker', 'admin'),
|
|
|
83 |
new lang_string('configallowemojipicker', 'admin'),
|
|
|
84 |
1
|
|
|
85 |
));
|
|
|
86 |
} else {
|
|
|
87 |
$optionalsubsystems->add(new admin_setting_description(
|
|
|
88 |
'allowemojipicker',
|
|
|
89 |
new lang_string('allowemojipicker', 'admin'),
|
|
|
90 |
new lang_string('configallowemojipickerincompatible', 'admin')
|
|
|
91 |
));
|
|
|
92 |
}
|
|
|
93 |
}
|