diff --git a/calendar/event.php b/calendar/event.php index b7c78d64ab9..e119df0b830 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -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'); } diff --git a/calendar/event_new.html b/calendar/event_new.html index 3c036bec4e7..6820973cfd2 100644 --- a/calendar/event_new.html +++ b/calendar/event_new.html @@ -29,9 +29,9 @@ : - timestart);?> + timestart);?> - timestart) ?> + timestart) ?>