]> git.mjollnir.org Git - moodle.git/commitdiff
Now calendar export have some correct defaults. MDL-10175
authorstronk7 <stronk7>
Tue, 19 Jun 2007 17:54:30 +0000 (17:54 +0000)
committerstronk7 <stronk7>
Tue, 19 Jun 2007 17:54:30 +0000 (17:54 +0000)
Merged from MOODLE_18_STABLE

calendar/export_basic.html
calendar/export_execute.php

index 56e1da3012eb4adbc48e38362b07e33b89f6c123..c0778dac5ada0ed9af699dc533a1395445a24ee0 100644 (file)
@@ -3,13 +3,13 @@
 <form method="get" action="export_execute.php">
 <?php print_string('iwanttoexport', 'calendar'); ?>:
 <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 />
 </div>
 <?php print_string('for', 'calendar'); ?>:
 <div class="indent">
     <?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 if($allownextweek) { ?>
     <input type="radio" name="preset_time" id="pt_wknext" value="weeknext" /><label for="pt_wknext"><?php print_string('weeknext', 'calendar'); ?></label><br />
index 87286f0c015a2c6491d9e92a0435cdcab8b31601..72904e11b16bd0cbdfbec4413ee4d9b3536f3ebf 100644 (file)
@@ -19,8 +19,8 @@ if ($authtoken != sha1($username . $user->password)) {
     die('Invalid authentication token');
 }
 
-$what = optional_param('preset_what', '', PARAM_ALPHA);
-$time = optional_param('preset_time', '', PARAM_ALPHA);
+$what = optional_param('preset_what', 'all', PARAM_ALPHA);
+$time = optional_param('preset_time', 'weeknow', PARAM_ALPHA);
 
 $now = usergetdate(time());
 // Let's see if we have sufficient and correct data
@@ -37,7 +37,7 @@ if(!empty($what) && !empty($time)) {
             $courses[SITEID] = new stdClass;
             $courses[SITEID]->shortname = get_string('globalevents', 'calendar');
         }
-        
+
         switch($time) {
             case 'weeknow':
                 $startweekday  = get_user_preferences('calendar_startwday', CALENDAR_STARTING_WEEKDAY);