load(); if ($post && $post->getType() == 'courseblogpost' && $post->canEdit()) { $course = $post->course; if ($post->delete()) { $Dippler->add_system_message(_("Post deleted.")); forward("course/announcements/{$course}"); } else { $Dippler->add_system_message(_("Post could not be deleted."), "error"); forward($post->getURL()); } } forward("courses/my"); ?>