Checking in Dan's patch for MDL-8670, thanks Dan!

This commit is contained in:
moodler
2007-02-27 00:58:47 +00:00
parent 2273ddbb27
commit bf522dad40
3 changed files with 11 additions and 0 deletions
+7
View File
@@ -14,10 +14,17 @@ $temp->add(new admin_setting_configcheckbox('tabselectedtofront', get_string('ta
$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'),
+3
View File
@@ -832,6 +832,9 @@ function calendar_time_representation($time) {
$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);
}
+1
View File
@@ -46,6 +46,7 @@ $string['explain_maxevents'] = 'This sets the maximum number of upcoming events
$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';