Skip to content

Commit

Permalink
MDL-30302 Adjust options for calendar day settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Robert Nicols committed Nov 28, 2011
1 parent 1de9151 commit 68ec4a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion calendar/preferences_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 68ec4a2

Please sign in to comment.