Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-30302 Adjust options for calendar day settings

  • Loading branch information...
commit 3564f5f026e239e561ec84d49d2d267781cd5598 1 parent bd464fb
@andrewnicols andrewnicols authored samhemelryk committed
Showing with 11 additions and 3 deletions.
  1. +10 −2 admin/settings/appearance.php
  2. +1 −1  calendar/preferences_form.php
View
12 admin/settings/appearance.php
@@ -56,8 +56,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);
View
2  calendar/preferences_form.php
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.