Merge branch 'MDL-40412_m25' of git://github.com/merrill-oakland/moodle into MOODLE_2...
[moodle.git] / admin / settings / location.php
blob607090a529a6887fb9673661ae70216f43b7ab86
1 <?php
3 if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
5 // "locations" settingpage
6 $temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'admin'));
7 $options = get_list_of_timezones();
8 $options[99] = new lang_string('serverlocaltime');
9 $temp->add(new admin_setting_configselect('timezone', new lang_string('timezone','admin'), new lang_string('configtimezone', 'admin'), 99, $options));
10 $options[99] = new lang_string('timezonenotforced', 'admin');
11 $temp->add(new admin_setting_configselect('forcetimezone', new lang_string('forcetimezone', 'admin'), new lang_string('helpforcetimezone', 'admin'), 99, $options));
12 $temp->add(new admin_settings_country_select('country', new lang_string('country', 'admin'), new lang_string('configcountry', 'admin'), 0));
13 $temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'admin'), new lang_string('defaultcity_help', 'admin'), ''));
15 $temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'admin'), new lang_string('iplookupinfo', 'admin')));
16 $temp->add(new admin_setting_configfile('geoipfile', new lang_string('geoipfile', 'admin'), new lang_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLiteCity.dat'));
17 $temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'admin'), new lang_string('googlemapkey3_help', 'admin'), '', PARAM_RAW, 60));
19 $temp->add(new admin_setting_configtext('allcountrycodes', new lang_string('allcountrycodes', 'admin'), new lang_string('configallcountrycodes', 'admin'), '', '/^(?:\w+(?:,\w+)*)?$/'));
21 $ADMIN->add('location', $temp);
23 } // end of speedup