3 if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
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));
8 $optionalsubsystems->add(new admin_setting_configcheckbox('usetags', new lang_string('usetags','admin'),new lang_string('configusetags', 'admin'), '1'));
10 $optionalsubsystems->add(new admin_setting_configcheckbox('enablenotes', new lang_string('enablenotes', 'notes'), new lang_string('configenablenotes', 'notes'), 1));
12 $optionalsubsystems->add(new admin_setting_configcheckbox('enableportfolios', new lang_string('enabled', 'portfolio'), new lang_string('enableddesc', 'portfolio'), 0));
14 $optionalsubsystems->add(new admin_setting_configcheckbox('enablewebservices', new lang_string('enablewebservices', 'admin'), new lang_string('configenablewebservices', 'admin'), 0));
16 $optionalsubsystems->add(new admin_setting_configcheckbox('messaging', new lang_string('messaging', 'admin'), new lang_string('configmessaging','admin'), 1));
18 $optionalsubsystems->add(new admin_setting_configcheckbox('messagingallusers',
19 new lang_string('messagingallusers', 'admin'),
20 new lang_string('configmessagingallusers', 'admin'),
25 DAYSECS
=> new lang_string('secondstotime86400'),
26 WEEKSECS
=> new lang_string('secondstotime604800'),
27 2620800 => new lang_string('nummonths', 'moodle', 1),
28 7862400 => new lang_string('nummonths', 'moodle', 3),
29 15724800 => new lang_string('nummonths', 'moodle', 6),
30 0 => new lang_string('never')
32 $optionalsubsystems->add(new admin_setting_configselect(
33 'messagingdeletereadnotificationsdelay',
34 new lang_string('messagingdeletereadnotificationsdelay', 'admin'),
35 new lang_string('configmessagingdeletereadnotificationsdelay', 'admin'),
39 $optionalsubsystems->add(new admin_setting_configselect(
40 'messagingdeleteallnotificationsdelay',
41 new lang_string('messagingdeleteallnotificationsdelay', 'admin'),
42 new lang_string('configmessagingdeleteallnotificationsdelay', 'admin'),
47 $optionalsubsystems->add(new admin_setting_configcheckbox('messagingallowemailoverride', new lang_string('messagingallowemailoverride', 'admin'), new lang_string('configmessagingallowemailoverride','admin'), 0));
49 $optionalsubsystems->add(new admin_setting_configcheckbox('enablestats', new lang_string('enablestats', 'admin'), new lang_string('configenablestats', 'admin'), 0));
51 $optionalsubsystems->add(new admin_setting_configcheckbox('enablerssfeeds', new lang_string('enablerssfeeds', 'admin'), new lang_string('configenablerssfeeds', 'admin'), 0));
53 $optionalsubsystems->add(new admin_setting_configcheckbox('enableblogs', new lang_string('enableblogs', 'admin'), new lang_string('configenableblogs', 'admin'), 1));
55 $options = array('off'=>new lang_string('off', 'mnet'), 'strict'=>new lang_string('on', 'mnet'));
56 $optionalsubsystems->add(new admin_setting_configselect('mnet_dispatcher_mode', new lang_string('net', 'mnet'), new lang_string('configmnet', 'mnet'), 'off', $options));
58 // Conditional activities: completion and availability
59 $optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
60 new lang_string('enablecompletion','completion'),
61 new lang_string('configenablecompletion', 'completion'), 1));
64 1 => get_string('completionactivitydefault', 'completion'),
65 0 => get_string('completion_none', 'completion')
67 $optionalsubsystems->add(new admin_setting_configselect('completiondefault', new lang_string('completiondefault', 'completion'),
68 new lang_string('configcompletiondefault', 'completion'), 1, $options));
70 $optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
71 new lang_string('enableavailability', 'availability'),
72 new lang_string('enableavailability_desc', 'availability'), 1));
73 $checkbox->set_affects_modinfo(true);
75 $optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', new lang_string('enableplagiarism','plagiarism'), new lang_string('configenableplagiarism','plagiarism'), 0));
77 $optionalsubsystems->add(new admin_setting_configcheckbox('enablebadges', new lang_string('enablebadges', 'badges'), new lang_string('configenablebadges', 'badges'), 1));
79 $optionalsubsystems->add(new admin_setting_configcheckbox('enableglobalsearch', new lang_string('enableglobalsearch', 'admin'),
80 new lang_string('enableglobalsearch_desc', 'admin'), 0, 1, 0));
82 $optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'),
83 new lang_string('allowstealthmodules_help'), 0, 1, 0));