Fix for bug 1528:

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.
This commit is contained in:
defacer 2004-06-23 09:43:00 +00:00
parent 9ad7ce6bca
commit 1cbcc2c3d0

View 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').'"