]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for bug 1528:
authordefacer <defacer>
Wed, 23 Jun 2004 09:43:00 +0000 (09:43 +0000)
committerdefacer <defacer>
Wed, 23 Jun 2004 09:43:00 +0000 (09:43 +0000)
Now the edit icon in day view for course activity events takes you to the
activity update form, and not the view. You can still go to the activity view
by clicking the activity name in the event title.

calendar/view.php

index 8715d65dc449ab0ce35eb21b69d60aafdce23d8a..a76898ca100cc54eb01186196021abf44693eaac 100644 (file)
@@ -578,11 +578,11 @@ function calendar_print_event($event) {
     if (calendar_edit_event_allowed($event)) {
         echo '<div align="right">';
         if (empty($event->cmid)) {
-            $editlink = CALENDAR_URL.'event.php?action=edit&amp;id='.$event->id;
+            $editlink   = CALENDAR_URL.'event.php?action=edit&amp;id='.$event->id;
             $deletelink = CALENDAR_URL.'event.php?action=delete&amp;id='.$event->id;
         } else {
-            $editlink   = "$CFG->wwwroot/mod/$event->modulename/view.php?id=$event->cmid";
-            $deletelink = "$CFG->wwwroot/course/mod.php?delete=$event->cmid";
+            $editlink   = $CFG->wwwroot.'/course/mod.php?update='.$event->cmid.'&amp;return=true';
+            $deletelink = $CFG->wwwroot.'/course/mod.php?delete='.$event->cmid;
         }
         echo ' <a href="'.$editlink.'"><img
                   src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('tt_editevent', 'calendar').'"