diff --git a/calendar/event.php b/calendar/event.php index 008ac9cbe1a..1a31d416f93 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -279,6 +279,12 @@ $form->minutes = ''; } } + if (!empty($form->courseid)) { // Fixes bug 1488 + $course = get_record('course', 'id', $form->courseid); + } else { + $course = $site; + } + print_side_block_start(get_string('editevent', 'calendar'), array('class' => 'mycalendar')); include('event_edit.html'); print_side_block_end(); diff --git a/calendar/event_edit.html b/calendar/event_edit.html index 4350060aecb..359b2cff9b2 100644 --- a/calendar/event_edit.html +++ b/calendar/event_edit.html @@ -1,7 +1,3 @@ -courseid) ? $form->courseid : $site->id); -?>