workaround by Dan for bug #3130, fixed some warnings

This commit is contained in:
skodak
2006-07-17 07:28:54 +00:00
parent b1682ee480
commit 285105fbf1
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -485,6 +485,9 @@
if($eventtype == 'select') {
$courseid = optional_param('courseid', $SESSION->cal_course_referer, PARAM_INT);
if ($courseid == 0) { // workaround by Dan for bug #3130
$courseid = SITEID;
}
if (!$course = get_record('course', 'id', $courseid)) {
error('Incorrect course ID');
}
+2 -2
View File
@@ -29,9 +29,9 @@
<?php print_string('eventdate', 'calendar'); ?>:
</td>
<td>
<?php print_date_selector('startday', 'startmon', 'startyr', $form->timestart);?>
<?php print_date_selector('startday', 'startmon', 'startyr', (int)$form->timestart);?>
<?php print_string('eventtime', 'calendar');?>
<?php print_time_selector('starthr', 'startmin', $form->timestart) ?>
<?php print_time_selector('starthr', 'startmin', (int)$form->timestart) ?>
<?php if (isset($err['timestart'])) formerr($err['timestart']); ?>
</td>
</tr>