Merging from MOODLE_18_STABLE:
[moodle.git] / admin / settings / appearance.php
CommitLineData
1ea1bcb3 1<?php // $Id$
2
3// This file defines settingpages and externalpages under the "appearance" category
4
5$ADMIN->add('appearance', new admin_category('themes', get_string('themes')));
6// "themesettings" settingpage
8f8ed475 7$temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin'));
1ea1bcb3 8$temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS));
9$temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0));
10$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
11$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
12$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
13$temp->add(new admin_setting_configcheckbox('tabselectedtofront', get_string('tabselectedtofronttext', 'admin'), get_string('tabselectedtofront', 'admin'), 0));
14$ADMIN->add('themes', $temp);
15$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
16
17
db51ddc5 18// calendar
3b904bc9 19$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
20$temp->add(new admin_setting_special_adminseesall());
21$temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0,
22array(
23 0 => get_string('sunday', 'calendar'),
24 1 => get_string('monday', 'calendar'),
25 2 => get_string('tuesday', 'calendar'),
26 3 => get_string('wednesday', 'calendar'),
27 4 => get_string('thursday', 'calendar'),
28 5 => get_string('friday', 'calendar'),
29 6 => get_string('saturday', 'calendar')
30 )));
31$temp->add(new admin_setting_special_calendar_weekend());
32$temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
33$temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
34$ADMIN->add('appearance', $temp);
1ea1bcb3 35
36// "filtersettings" settingpage
37$temp = new admin_settingpage('filtersettings', get_string('filtersettings', 'admin'));
38$temp->add(new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, array(604800 => get_string('numdays','',7),
39 86400 => get_string('numdays','',1),
40 43200 => get_string('numhours','',12),
41 10800 => get_string('numhours','',3),
42 7200 => get_string('numhours','',2),
43 3600 => get_string('numhours','',1),
44 2700 => get_string('numminutes','',45),
45 1800 => get_string('numminutes','',30),
46 900 => get_string('numminutes','',15),
47 600 => get_string('numminutes','',10),
48 540 => get_string('numminutes','',9),
49 480 => get_string('numminutes','',8),
50 420 => get_string('numminutes','',7),
51 360 => get_string('numminutes','',6),
52 300 => get_string('numminutes','',5),
53 240 => get_string('numminutes','',4),
54 180 => get_string('numminutes','',3),
55 120 => get_string('numminutes','',2),
56 60 => get_string('numminutes','',1),
57 30 => get_string('numseconds','',30),
58 0 => get_string('no'))));
59$temp->add(new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
60 '1' => get_string('allfiles'),
61240489 61 '2' => get_string('htmlfilesonly'))));
1ea1bcb3 62$temp->add(new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0));
63$temp->add(new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0));
64$temp->add(new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0));
65$ADMIN->add('appearance', $temp);
66
67
68
69
70
71// "htmleditor" settingpage
72$temp = new admin_settingpage('htmleditor', get_string('htmleditor', 'admin'));
73$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
74$temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS));
75$temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS));
76$temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS));
77$temp->add(new admin_setting_special_editorfontlist());
78$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
79if (!empty($CFG->aspellpath)) { // make aspell settings disappear if path isn't set
80 $temp->add(new admin_setting_configcheckbox('editorspelling', get_string('editorspelling', 'admin'), get_string('editorspellinghelp', 'admin'), 0));
81 $temp->add(new admin_setting_special_editordictionary());
82}
83$temp->add(new admin_setting_special_editorhidebuttons());
84$ADMIN->add('appearance', $temp);
85
86// "documentation" settingpage
87$temp = new admin_settingpage('documentation', get_string('moodledocs'));
88$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
89$temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0));
90$ADMIN->add('appearance', $temp);
91
92$temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
93$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
94$ADMIN->add('appearance', $temp);
95
5a412dbf 96// new CFG variable for gradebook (what roles to display)
73afaf5b 97$temp = new admin_settingpage('gradebook', get_string('gradebook', 'admin'));
0909d44e 98$temp->add(new admin_setting_special_gradebookroles());
5a412dbf 99$ADMIN->add('appearance', $temp);
100
d42c64ba 101// new CFG variable for coursemanager (what roles to display)
102$temp = new admin_settingpage('coursemanager', get_string('coursemanager', 'admin'));
103$temp->add(new admin_setting_special_coursemanager());
104$ADMIN->add('appearance', $temp);
5a412dbf 105
36832f4d 106$ADMIN->add('appearance', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
107
1ea1bcb3 108?>