]> git.mjollnir.org Git - moodle.git/commitdiff
Re-fixed bug 1488 hack
authormoodler <moodler>
Fri, 4 Jun 2004 07:21:15 +0000 (07:21 +0000)
committermoodler <moodler>
Fri, 4 Jun 2004 07:21:15 +0000 (07:21 +0000)
calendar/event.php
calendar/event_edit.html

index 008ac9cbe1af55d5096d15a16f8d68552ac5ebbd..1a31d416f9337cf636f027071d6721921434375e 100644 (file)
                     $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();
index 4350060aecb5a439407398598f87d9f582a366f8..359b2cff9b2ef3dcdb8d9c4d1419bb5493504bd4 100644 (file)
@@ -1,7 +1,3 @@
-<?php
-    // The following is a hack to fix bug 1488
-    $course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
-?>
 <form method="post" action="event.php" name="edit">
 <table cellpadding=5>
   <tr>