category);
if (! $delete) {
$strdeletecheck = get_string("deletecheck", "", $course->shortname);
$strdeletecoursecheck = get_string("deletecoursecheck");
print_header("$site->shortname: $strdeletecheck", $site->fullname,
"admin/index.php\">$stradministration -> ".
"$strcategories -> ".
"category\">$category->name -> ".
"$strdeletecheck");
notice_yesno("$strdeletecoursecheck
$course->fullname ($course->shortname)",
"delete.php?id=$course->id&delete=".md5($course->timemodified),
"category.php?id=$course->category");
exit;
}
if ($delete != md5($course->timemodified)) {
error("The check variable was wrong - try again");
}
// OK checks done, delete the course now.
$strdeletingcourse = get_string("deletingcourse", "", $course->shortname);
print_header("$site->shortname: $strdeletingcourse", $site->fullname,
"admin/index.php\">$stradministration -> ".
"$strcategories -> ".
"category\">$category->name -> ".
"$strdeletingcourse");
print_heading($strdeletingcourse);
if (!remove_course_contents($course->id)) {
notify("An error occurred while deleting some of the course contents.");
}
if (!delete_records("course", "id", $course->id)) {
notify("An error occurred while deleting the main course record.");
}
print_heading( get_string("deletedcourse", "", $course->shortname) );
print_continue("category.php?id=$course->category");
print_footer();
?>