From: poltawski Date: Mon, 3 Dec 2007 12:23:24 +0000 (+0000) Subject: MDL-12409 - stop access to editing 'site course' with course edit form. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b60fd03245c6da1b8bd67eda6388be3158b881e5;p=moodle.git MDL-12409 - stop access to editing 'site course' with course edit form. Merged from MOODLE_19_STABLE --- diff --git a/course/edit.php b/course/edit.php index f25fb849f5..4e1135707c 100644 --- a/course/edit.php +++ b/course/edit.php @@ -13,6 +13,12 @@ /// basic access control checks if ($id) { // editing course + + if($id == SITEID){ + // don't allow editing of 'site course' using this from + error('You cannot edit the site course using this form'); + } + if (!$course = get_record('course', 'id', $id)) { error('Course ID was incorrect'); }