MDL-11934 grade report in user profile now selectable
[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));
a907c540 11$temp->add(new admin_setting_configcheckbox('allowcategorythemes', get_string('allowcategorythemes', 'admin'), get_string('configallowcategorythemes', 'admin'), 0));
1ea1bcb3 12$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
13$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
3b27b0fe 14$temp->add(new admin_setting_configselect('hideactivitytypenavlink', get_string('hideactivitytypenavlink', 'admin'), get_string('confighideactivitytypenavlink', 'admin'), 0,
d91f99a6 15array(
16 0 => get_string('hidefromnone', 'admin'),
17 1 => get_string('hidefromstudents', 'admin'),
18 2 => get_string('hidefromall', 'admin')
19 )));
1ea1bcb3 20$ADMIN->add('themes', $temp);
21$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
22
c7dd2550 23# for CALENDAR_TF_12 and CALENDAR_TF_24 ...
24require_once($CFG->dirroot . '/calendar/lib.php');
1ea1bcb3 25
db51ddc5 26// calendar
3b904bc9 27$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
28$temp->add(new admin_setting_special_adminseesall());
c7dd2550 29$temp->add(new admin_setting_configselect('calendar_site_timeformat', get_string('pref_timeformat', 'calendar'), get_string('explain_site_timeformat', 'calendar'), '0',
30array( 0 => get_string('default', 'calendar'),
31 CALENDAR_TF_12 => get_string('timeformat_12', 'calendar'),
32 CALENDAR_TF_24 => get_string('timeformat_24', 'calendar')
33 )));
3b904bc9 34$temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0,
35array(
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));
47$ADMIN->add('appearance', $temp);
1ea1bcb3 48
49// "filtersettings" settingpage
50$temp = new admin_settingpage('filtersettings', get_string('filtersettings', 'admin'));
51$temp->add(new admin_setting_configselect('cachetext', get_string('cachetext', 'admin'), get_string('configcachetext', 'admin'), 60, array(604800 => get_string('numdays','',7),
52 86400 => get_string('numdays','',1),
53 43200 => get_string('numhours','',12),
54 10800 => get_string('numhours','',3),
55 7200 => get_string('numhours','',2),
56 3600 => get_string('numhours','',1),
57 2700 => get_string('numminutes','',45),
58 1800 => get_string('numminutes','',30),
59 900 => get_string('numminutes','',15),
60 600 => get_string('numminutes','',10),
61 540 => get_string('numminutes','',9),
62 480 => get_string('numminutes','',8),
63 420 => get_string('numminutes','',7),
64 360 => get_string('numminutes','',6),
65 300 => get_string('numminutes','',5),
66 240 => get_string('numminutes','',4),
67 180 => get_string('numminutes','',3),
68 120 => get_string('numminutes','',2),
69 60 => get_string('numminutes','',1),
70 30 => get_string('numseconds','',30),
71 0 => get_string('no'))));
72$temp->add(new admin_setting_configselect('filteruploadedfiles', get_string('filteruploadedfiles', 'admin'), get_string('configfilteruploadedfiles', 'admin'), 0, array('0' => get_string('none'),
73 '1' => get_string('allfiles'),
61240489 74 '2' => get_string('htmlfilesonly'))));
1ea1bcb3 75$temp->add(new admin_setting_configcheckbox('filtermatchoneperpage', get_string('filtermatchoneperpage', 'admin'), get_string('configfiltermatchoneperpage', 'admin'), 0));
76$temp->add(new admin_setting_configcheckbox('filtermatchonepertext', get_string('filtermatchonepertext', 'admin'), get_string('configfiltermatchonepertext', 'admin'), 0));
77$temp->add(new admin_setting_configcheckbox('filterall', get_string('filterall', 'admin'), get_string('configfilterall', 'admin'), 0));
78$ADMIN->add('appearance', $temp);
79
80
81
82
83
84// "htmleditor" settingpage
85$temp = new admin_settingpage('htmleditor', get_string('htmleditor', 'admin'));
86$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
87$temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS));
88$temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS));
89$temp->add(new admin_setting_configtext('editorfontsize', get_string('editorfontsize', 'admin'), get_string('edhelpfontsize'), '', PARAM_NOTAGS));
90$temp->add(new admin_setting_special_editorfontlist());
91$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
92if (!empty($CFG->aspellpath)) { // make aspell settings disappear if path isn't set
93 $temp->add(new admin_setting_configcheckbox('editorspelling', get_string('editorspelling', 'admin'), get_string('editorspellinghelp', 'admin'), 0));
94 $temp->add(new admin_setting_special_editordictionary());
95}
96$temp->add(new admin_setting_special_editorhidebuttons());
97$ADMIN->add('appearance', $temp);
98
99// "documentation" settingpage
100$temp = new admin_settingpage('documentation', get_string('moodledocs'));
101$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
102$temp->add(new admin_setting_configcheckbox('doctonewwindow', get_string('doctonewwindow', 'admin'), get_string('configdoctonewwindow', 'admin'), 0));
103$ADMIN->add('appearance', $temp);
104
105$temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
106$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
107$ADMIN->add('appearance', $temp);
108
5a412dbf 109// new CFG variable for gradebook (what roles to display)
73afaf5b 110$temp = new admin_settingpage('gradebook', get_string('gradebook', 'admin'));
0909d44e 111$temp->add(new admin_setting_special_gradebookroles());
5a412dbf 112$ADMIN->add('appearance', $temp);
113
d42c64ba 114// new CFG variable for coursemanager (what roles to display)
115$temp = new admin_settingpage('coursemanager', get_string('coursemanager', 'admin'));
116$temp->add(new admin_setting_special_coursemanager());
117$ADMIN->add('appearance', $temp);
5a412dbf 118
36832f4d 119$ADMIN->add('appearance', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
120
501e725e 121$temp = new admin_settingpage('ajax', get_string('ajaxuse'));
122$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 0));
123$ADMIN->add('appearance', $temp);
1c63e174 124
125// link to tag management interface
126$ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
1ea1bcb3 127?>