MDL-12409 - stop access to editing 'site course' with course edit form.

Merged from MOODLE_19_STABLE
This commit is contained in:
poltawski 2007-12-03 12:23:24 +00:00
parent 93c61c18cf
commit b60fd03245

View File

@ -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');
}