]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12409 - stop access to editing 'site course' with course edit form.
authorpoltawski <poltawski>
Mon, 3 Dec 2007 12:23:24 +0000 (12:23 +0000)
committerpoltawski <poltawski>
Mon, 3 Dec 2007 12:23:24 +0000 (12:23 +0000)
Merged from MOODLE_19_STABLE

course/edit.php

index f25fb849f57437412ec69b8aa247ec2d4533a311..4e1135707c5e1315ace3aee79c3dc07d5418bb4c 100644 (file)
 
 /// 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');
         }