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"); ?>