From e4bbaab3c3a81e57fe22a7c7697057caa90da9e8 Mon Sep 17 00:00:00 2001 From: defacer Date: Fri, 14 May 2004 13:49:42 +0000 Subject: [PATCH] Half the work done for bug 1330: Now when creating events you don't select a course, the current course is selected implicitly. --- calendar/event.php | 6 +++--- calendar/event_select.html | 15 ++++----------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/calendar/event.php b/calendar/event.php index eabd3dfe70..3293065a41 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -163,7 +163,7 @@ /// Log the event entry. add_to_log($form->courseid, 'calendar', 'add', 'event.php?action=edit&id='.$eventid, $form->name); - + if ($form->repeat) { for($i = 1; $i < $form->repeats; $i++) { $form->timestart += 604800; // add one week @@ -173,7 +173,7 @@ add_to_log($form->courseid, 'calendar', 'add', 'event.php?action=edit&id='.$eventid, $form->name); } } - + // OK, now redirect to day view redirect(CALENDAR_URL.'view.php?view=day&cal_d='.$form->startday.'&cal_m='.$form->startmon.'&cal_y='.$form->startyr); } @@ -381,7 +381,7 @@ print_side_block_start(get_string('newevent', 'calendar').$header, '', 'mycalendar'); if($_REQUEST['type'] == 'select') { optional_variable($_REQUEST['groupid']); - optional_variable($_REQUEST['courseid']); + optional_variable($_REQUEST['courseid'], $SESSION->cal_course_referer); $groupid = $_REQUEST['groupid']; $courseid = $_REQUEST['courseid']; include('event_select.html'); diff --git a/calendar/event_select.html b/calendar/event_select.html index 15a9fe942c..47c2c3de93 100644 --- a/calendar/event_select.html +++ b/calendar/event_select.html @@ -20,18 +20,11 @@ - courses)) { ?>

-
- : - -
+ courses)) { ?> +

- site)) { ?>

+ site)) { ?> +

-- 2.39.5