From: martin Date: Fri, 2 Aug 2002 09:19:22 +0000 (+0000) Subject: This file is not linked to or used by anything yet, but I've found it X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=238a826393f8cbd3be2c8b493185db5eccb36d7a;p=moodle.git This file is not linked to or used by anything yet, but I've found it useful to delete forums properly while testing stuff. --- diff --git a/mod/forum/delete.php b/mod/forum/delete.php new file mode 100644 index 0000000000..3eb2b60a0b --- /dev/null +++ b/mod/forum/delete.php @@ -0,0 +1,27 @@ +course)) { + error("Forum course was incorrect"); + } + + if (!isteacher($forum->course)) { + error("You are not allowed to do this"); + } + + if (! delete_instance($forum->id)) { + error("Could not delete that forum"); + } + + redirect("$CFG->wwwroot/mod/forum/index.php?id=$course->id"); +?>