MDL-65896 admin: add admin setting to show emoji picker
[moodle.git] / admin / settings / subsystems.php
CommitLineData
11b749ca 1<?php
90658eef 2
3if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
4
e106013f
SH
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));
90658eef 7
e106013f 8 $optionalsubsystems->add(new admin_setting_configcheckbox('usetags', new lang_string('usetags','admin'),new lang_string('configusetags', 'admin'), '1'));
90658eef 9
e106013f 10 $optionalsubsystems->add(new admin_setting_configcheckbox('enablenotes', new lang_string('enablenotes', 'notes'), new lang_string('configenablenotes', 'notes'), 1));
90658eef 11
e106013f 12 $optionalsubsystems->add(new admin_setting_configcheckbox('enableportfolios', new lang_string('enabled', 'portfolio'), new lang_string('enableddesc', 'portfolio'), 0));
90658eef 13
e106013f 14 $optionalsubsystems->add(new admin_setting_configcheckbox('enablewebservices', new lang_string('enablewebservices', 'admin'), new lang_string('configenablewebservices', 'admin'), 0));
884f46c9 15
e106013f 16 $optionalsubsystems->add(new admin_setting_configcheckbox('enablestats', new lang_string('enablestats', 'admin'), new lang_string('configenablestats', 'admin'), 0));
90658eef 17
e106013f 18 $optionalsubsystems->add(new admin_setting_configcheckbox('enablerssfeeds', new lang_string('enablerssfeeds', 'admin'), new lang_string('configenablerssfeeds', 'admin'), 0));
90658eef 19
850d2db8 20 $optionalsubsystems->add(new admin_setting_configcheckbox('enableblogs', new lang_string('enableblogs', 'admin'), new lang_string('configenableblogs', 'admin'), 1));
90658eef 21
e106013f
SH
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));
90658eef 24
82bd6a5e 25 // Conditional activities: completion and availability
11b749ca 26 $optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
e106013f 27 new lang_string('enablecompletion','completion'),
e354bf1e 28 new lang_string('configenablecompletion', 'completion'), 1));
4ed60499
EM
29
30 $options = array(
31 1 => get_string('completionactivitydefault', 'completion'),
32 0 => get_string('completion_none', 'completion')
33 );
34 $optionalsubsystems->add(new admin_setting_configselect('completiondefault', new lang_string('completiondefault', 'completion'),
35 new lang_string('configcompletiondefault', 'completion'), 1, $options));
36
adaeccb6 37 $optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
8d1f33e1 38 new lang_string('enableavailability', 'availability'),
e354bf1e 39 new lang_string('enableavailability_desc', 'availability'), 1));
adaeccb6 40 $checkbox->set_affects_modinfo(true);
bce59524 41
e106013f 42 $optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', new lang_string('enableplagiarism','plagiarism'), new lang_string('configenableplagiarism','plagiarism'), 0));
27806552
YB
43
44 $optionalsubsystems->add(new admin_setting_configcheckbox('enablebadges', new lang_string('enablebadges', 'badges'), new lang_string('configenablebadges', 'badges'), 1));
db48207e
DM
45
46 $optionalsubsystems->add(new admin_setting_configcheckbox('enableglobalsearch', new lang_string('enableglobalsearch', 'admin'),
47 new lang_string('enableglobalsearch_desc', 'admin'), 0, 1, 0));
8341055e 48
ad2cba8e
LB
49 $optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'),
50 new lang_string('allowstealthmodules_help'), 0, 1, 0));
bf25fb16
DM
51
52 $optionalsubsystems->add(new admin_setting_configcheckbox('enableanalytics', new lang_string('enableanalytics', 'admin'),
53 new lang_string('configenableanalytics', 'admin'), 1, 1, 0));
4060fcc6
RW
54
55
56 $fullunicodesupport = true;
57 if ($DB->get_dbfamily() == 'mysql') {
58 $collation = $DB->get_dbcollation();
59 $collationinfo = explode('_', $collation);
60 $charset = reset($collationinfo);
61
62 if ($charset !== 'utf8') {
63 $fullunicodesupport = false;
64 }
65 }
66
67 if ($fullunicodesupport) {
68 $optionalsubsystems->add(new admin_setting_configcheckbox(
69 'allowemojipicker',
70 new lang_string('allowemojipicker', 'admin'),
71 new lang_string('configallowemojipicker', 'admin'),
72 1
73 ));
74 } else {
75 $optionalsubsystems->add(new admin_setting_description(
76 'allowemojipicker',
77 new lang_string('allowemojipicker', 'admin'),
78 new lang_string('configallowemojipickerincompatible', 'admin')
79 ));
80 }
84f533b3 81}