$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
+# for CALENDAR_TF_12 and CALENDAR_TF_24 ...
+require_once($CFG->dirroot . '/calendar/lib.php');
// calendar
$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
$temp->add(new admin_setting_special_adminseesall());
+$temp->add(new admin_setting_configselect('calendar_site_timeformat', get_string('pref_timeformat', 'calendar'), get_string('explain_site_timeformat', 'calendar'), '0',
+array( 0 => get_string('default', 'calendar'),
+ CALENDAR_TF_12 => get_string('timeformat_12', 'calendar'),
+ CALENDAR_TF_24 => get_string('timeformat_24', 'calendar')
+ )));
$temp->add(new admin_setting_configselect('calendar_startwday', get_string('configstartwday', 'admin'), get_string('helpstartofweek', 'admin'), 0,
array(
0 => get_string('sunday', 'calendar'),
$langtimeformat = get_string('strftimetime');
}
$timeformat = get_user_preferences('calendar_timeformat');
+ if(empty($timeformat)){
+ $timeformat = get_config(NULL,'calendar_site_timeformat');
+ }
// The ? is needed because the preference might be present, but empty
return userdate($time, empty($timeformat) ? $langtimeformat : $timeformat);
}
$string['explain_persistflt'] = 'If this is enabled, then Moodle will remember your last event filter settings and automatically restore them each time you login.';
$string['explain_startwday'] = 'Calendar weeks will be shown as starting on the day that you select here.';
$string['explain_timeformat'] = 'You can choose to see times in either 12 or 24 hour format. If you choose \"default\", then the format will be automatically chosen according to the language you use in the site.';
+$string['explain_site_timeformat'] = 'You can choose to see times in either 12 or 24 hour format for the whole site. If you choose \"default\", then the format will be automatically chosen according to the language you use in the site. This setting can be overridden by user preferences.';
$string['export'] = 'Export';
$string['exportcalendar'] = 'Export calendar';
$string['exportbutton'] = 'Export';