Skip to content

Commit

Permalink
Now calendar export have some correct defaults. MDL-10175
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jun 19, 2007
1 parent c92d8dd commit 55005a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions calendar/export_basic.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<form method="get" action="export_execute.php"> <form method="get" action="export_execute.php">
<?php print_string('iwanttoexport', 'calendar'); ?>: <?php print_string('iwanttoexport', 'calendar'); ?>:
<div class="indent"> <div class="indent">
<input type="radio" name="preset_what" id="pw_all" value="all" /><label for="pw_all"><?php print_string('eventsall', 'calendar'); ?></label><br /> <input type="radio" name="preset_what" id="pw_all" value="all" checked="checked"/><label for="pw_all"><?php print_string('eventsall', 'calendar'); ?></label><br />
<input type="radio" name="preset_what" id="pw_course" value="courses" /><label for="pw_course"><?php print_string('eventsrelatedtocourses', 'calendar'); ?></label><br /> <input type="radio" name="preset_what" id="pw_course" value="courses" /><label for="pw_course"><?php print_string('eventsrelatedtocourses', 'calendar'); ?></label><br />
</div> </div>
<?php print_string('for', 'calendar'); ?>: <?php print_string('for', 'calendar'); ?>:
<div class="indent"> <div class="indent">
<?php if($allowthisweek) { ?> <?php if($allowthisweek) { ?>
<input type="radio" name="preset_time" id="pt_wknow" value="weeknow" /><label for="pt_wknow"><?php print_string('weekthis', 'calendar'); ?></label><br /> <input type="radio" name="preset_time" id="pt_wknow" value="weeknow" checked="checked"/><label for="pt_wknow"><?php print_string('weekthis', 'calendar'); ?></label><br />
<?php } ?> <?php } ?>
<?php if($allownextweek) { ?> <?php if($allownextweek) { ?>
<input type="radio" name="preset_time" id="pt_wknext" value="weeknext" /><label for="pt_wknext"><?php print_string('weeknext', 'calendar'); ?></label><br /> <input type="radio" name="preset_time" id="pt_wknext" value="weeknext" /><label for="pt_wknext"><?php print_string('weeknext', 'calendar'); ?></label><br />
Expand Down
6 changes: 3 additions & 3 deletions calendar/export_execute.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
die('Invalid authentication token'); die('Invalid authentication token');
} }


$what = optional_param('preset_what', '', PARAM_ALPHA); $what = optional_param('preset_what', 'all', PARAM_ALPHA);
$time = optional_param('preset_time', '', PARAM_ALPHA); $time = optional_param('preset_time', 'weeknow', PARAM_ALPHA);


$now = usergetdate(time()); $now = usergetdate(time());
// Let's see if we have sufficient and correct data // Let's see if we have sufficient and correct data
Expand All @@ -37,7 +37,7 @@
$courses[SITEID] = new stdClass; $courses[SITEID] = new stdClass;
$courses[SITEID]->shortname = get_string('globalevents', 'calendar'); $courses[SITEID]->shortname = get_string('globalevents', 'calendar');
} }

switch($time) { switch($time) {
case 'weeknow': case 'weeknow':
$startweekday = get_user_preferences('calendar_startwday', CALENDAR_STARTING_WEEKDAY); $startweekday = get_user_preferences('calendar_startwday', CALENDAR_STARTING_WEEKDAY);
Expand Down

0 comments on commit 55005a5

Please sign in to comment.