MDL-11843 deleting of activities directly from calendar is dangerous/confusing; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-02-19 10:46:10 +00:00
parent 4f22f6a5f1
commit a71a3aefe0

View File

@ -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>';