From b60fd03245c6da1b8bd67eda6388be3158b881e5 Mon Sep 17 00:00:00 2001 From: poltawski Date: Mon, 3 Dec 2007 12:23:24 +0000 Subject: [PATCH] MDL-12409 - stop access to editing 'site course' with course edit form. Merged from MOODLE_19_STABLE --- course/edit.php | 6 ++++++ 1 file changed, 6 insertions(+) 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'); } -- 2.39.5