1ea1bcb3 |
1 | <?php // $Id$ |
2 | |
3 | // This file defines settingpages and externalpages under the "appearance" category |
4 | |
a559f630 |
5 | if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page |
6 | |
220a90c5 |
7 | $ADMIN->add('appearance', new admin_category('themes', get_string('themes'))); |
8 | // "themesettings" settingpage |
9 | $temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin')); |
10 | $temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS)); |
11 | $temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0)); |
12 | $temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0)); |
13 | $temp->add(new admin_setting_configcheckbox('allowcategorythemes', get_string('allowcategorythemes', 'admin'), get_string('configallowcategorythemes', 'admin'), 0)); |
14 | $temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1)); |
15 | $temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0)); |
16 | $temp->add(new admin_setting_configselect('hideactivitytypenavlink', get_string('hideactivitytypenavlink', 'admin'), get_string('confighideactivitytypenavlink', 'admin'), 0, |
17 | array( |
18 | 0 => get_string('hidefromnone', 'admin'), |
19 | 1 => get_string('hidefromstudents', 'admin'), |
20 | 2 => get_string('hidefromall', 'admin') |
21 | ))); |
22 | $ADMIN->add('themes', $temp); |
23 | $ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php')); |
24 | |
25 | // calendar |
26 | $temp = new admin_settingpage('calendar', get_string('calendarsettings','admin')); |
27 | $temp->add(new admin_setting_special_adminseesall()); |
28 | //this is hacky because we do not want to include the stuff from calendar/lib.php |
29 | $temp->add(new admin_setting_configselect('calendar_site_timeformat', get_string('pref_timeformat', 'calendar'), |
30 | get_string('explain_site_timeformat', 'calendar'), '0', |
31 | array('0' => get_string('default', 'calendar'), |
32 | '%I:%M %p' => get_string('timeformat_12', 'calendar'), |
33 | '%H:%M' => get_string('timeformat_24', 'calendar')))); |
34 | $temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0, |
35 | array( |
36 | 0 => get_string('sunday', 'calendar'), |
37 | 1 => get_string('monday', 'calendar'), |
38 | 2 => get_string('tuesday', 'calendar'), |
39 | 3 => get_string('wednesday', 'calendar'), |
40 | 4 => get_string('thursday', 'calendar'), |
41 | 5 => get_string('friday', 'calendar'), |
42 | 6 => get_string('saturday', 'calendar') |
43 | ))); |
44 | $temp->add(new admin_setting_special_calendar_weekend()); |
45 | $temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT)); |
46 | $temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT)); |
dbf9d4cb |
47 | $temp->add(new admin_setting_configcheckbox('enablecalendarexport', get_string('enablecalendarexport', 'admin'), get_string('configenablecalendarexport','admin'), 1)); |
7baf68d8 |
48 | $temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(60))); |
220a90c5 |
49 | $ADMIN->add('appearance', $temp); |
50 | |
51 | // "htmleditor" settingpage |
c7b4be09 |
52 | $ADMIN->add('appearance', new admin_category('htmleditor', get_string('htmleditor', 'admin'))); |
53 | |
54 | $temp = new admin_settingpage('htmleditorsettings', get_string('htmleditorsettings', 'admin')); |
55 | |
5fc97603 |
56 | $htmleditors = get_available_html_editors(); |
57 | |
c7b4be09 |
58 | $temp->add(new admin_setting_configselect('defaulthtmleditor', get_string('defaulthtmleditor', 'admin'), null, 'tinymce', $htmleditors)); |
0687e555 |
59 | $temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1)); |
e7a3f429 |
60 | $temp->add(new admin_setting_emoticons()); |
c7b4be09 |
61 | $ADMIN->add('htmleditor', $temp); |
62 | |
6bebbe45 |
63 | /* TODO: before deleting these settings migrate or drop config values! |
c7b4be09 |
64 | $temp = new admin_settingpage('htmlarea', get_string('htmlarea', 'admin')); |
220a90c5 |
65 | $temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS)); |
66 | $temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS)); |
67 | $temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS)); |
68 | $temp->add(new admin_setting_special_editorfontlist()); |
69 | $temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1)); |
220a90c5 |
70 | $temp->add(new admin_setting_special_editorhidebuttons()); |
c7b4be09 |
71 | $ADMIN->add('htmleditor', $temp); |
6bebbe45 |
72 | */ |
c7b4be09 |
73 | |
6bebbe45 |
74 | $temp = new admin_settingpage('tinymce', 'TinyMCE'); |
c7b4be09 |
75 | // add tinymce configuration options here |
76 | $ADMIN->add('htmleditor', $temp); |
220a90c5 |
77 | |
6bebbe45 |
78 | // "htmlsettings" settingpage |
8eb1d25f |
79 | $temp = new admin_settingpage('htmlsettings', get_string('htmlsettings', 'admin')); |
80 | $temp->add(new admin_setting_configcheckbox('formatstringstriptags', get_string('stripalltitletags', 'admin'), get_string('configstripalltitletags', 'admin'), 1)); |
81 | $ADMIN->add('appearance', $temp); |
82 | |
220a90c5 |
83 | // "documentation" settingpage |
84 | $temp = new admin_settingpage('documentation', get_string('moodledocs')); |
85 | $temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL)); |
86 | $temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0)); |
87 | $ADMIN->add('appearance', $temp); |
88 | |
89 | $temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin')); |
90 | $temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0)); |
ebb1a1e8 |
91 | $temp->add(new admin_setting_configtext('mycoursesperpage', get_string('mycoursesperpage', 'admin'), get_string('configmycoursesperpage', 'admin'), 21, PARAM_INT)); |
220a90c5 |
92 | $ADMIN->add('appearance', $temp); |
93 | |
94 | // new CFG variable for coursemanager (what roles to display) |
95 | $temp = new admin_settingpage('coursemanager', get_string('coursemanager', 'admin')); |
96 | $temp->add(new admin_setting_special_coursemanager()); |
97 | $ADMIN->add('appearance', $temp); |
98 | |
220a90c5 |
99 | $temp = new admin_settingpage('ajax', get_string('ajaxuse')); |
6d77b23c |
100 | $temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 1)); |
7f2a7c3c |
101 | $temp->add(new admin_setting_configcheckbox('useexternalyui', get_string('useexternalyui', 'admin'), get_string('configuseexternalyui', 'admin'), 0)); |
6d77b23c |
102 | $temp->add(new admin_setting_configcheckbox('disablecourseajax', get_string('disablecourseajax', 'admin'), get_string('configdisablecourseajax', 'admin'), |
103 | isset($CFG->disablecourseajax) ? 1 : empty($CFG->enableajax))); |
220a90c5 |
104 | $ADMIN->add('appearance', $temp); |
105 | |
106 | // link to tag management interface |
107 | $ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php")); |
a559f630 |
108 | |
109 | } // end of speedup |
1ea1bcb3 |
110 | ?> |