Permalink
Browse files

MDL-30302 Adjust options for calendar day settings

  • Loading branch information...
1 parent aafb430 commit 04b1bdffdb38bce9285ad8935b7fb21d337983c0 @andrewnicols andrewnicols committed with Sam Hemelryk Nov 16, 2011
Showing with 11 additions and 3 deletions.
  1. +10 −2 admin/settings/appearance.php
  2. +1 −1 calendar/preferences_form.php
@@ -54,8 +54,16 @@
6 => get_string('saturday', 'calendar')
)));
$temp->add(new admin_setting_special_calendar_weekend());
- $temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
- $temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
+ $options = array();
+ for ($i=1; $i<=99; $i++) {
+ $options[$i] = $i;
+ }
+ $temp->add(new admin_setting_configselect('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,$options));
+ $options = array();
+ for ($i=1; $i<=20; $i++) {
+ $options[$i] = $i;
+ }
+ $temp->add(new admin_setting_configselect('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,$options));
$temp->add(new admin_setting_configcheckbox('enablecalendarexport', get_string('enablecalendarexport', 'admin'), get_string('configenablecalendarexport','admin'), 1));
$temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(60)));
$ADMIN->add('appearance', $temp);
@@ -71,7 +71,7 @@ function definition() {
$mform->addHelpButton('maxevents', 'pref_maxevents', 'calendar');
$options = array();
- for ($i=1; $i<=20; $i++) {
+ for ($i=1; $i<=99; $i++) {
$options[$i] = $i;
}
$mform->addElement('select', 'lookahead', get_string('pref_lookahead', 'calendar'), $options);

0 comments on commit 04b1bdf

Please sign in to comment.