Skip to content

Commit

Permalink
MDL-11843 deleting of activities directly from calendar is dangerous/…
Browse files Browse the repository at this point in the history
…confusing; merged from MOODLE_19_STABLE
  • Loading branch information
skodak committed Feb 19, 2008
1 parent 4f22f6a commit a71a3ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions calendar/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,16 @@ function calendar_print_event($event) {
$deletelink = CALENDAR_URL.'event.php?action=delete&id='.$event->id.$calendarcourseid;
} else {
$editlink = $CFG->wwwroot.'/course/mod.php?update='.$event->cmid.'&return=true&sesskey='.$USER->sesskey;
$deletelink = $CFG->wwwroot.'/course/mod.php?delete='.$event->cmid.'&sesskey='.$USER->sesskey;;
$deletelink = ''; // deleting activities directly from calendar is dangerous/confusing - see MDL-11843
}
echo ' <a href="'.$editlink.'"><img
src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('tt_editevent', 'calendar').'"
title="'.get_string('tt_editevent', 'calendar').'" /></a>';
echo ' <a href="'.$deletelink.'"><img
src="'.$CFG->pixpath.'/t/delete.gif" alt="'.get_string('tt_deleteevent', 'calendar').'"
title="'.get_string('tt_deleteevent', 'calendar').'" /></a>';
if ($deletelink) {
echo ' <a href="'.$deletelink.'"><img
src="'.$CFG->pixpath.'/t/delete.gif" alt="'.get_string('tt_deleteevent', 'calendar').'"
title="'.get_string('tt_deleteevent', 'calendar').'" /></a>';
}
echo '</div>';
}
echo '</td></tr></table>';
Expand Down

0 comments on commit a71a3ae

Please sign in to comment.