mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-12409 - stop access to editing 'site course' with course edit form.
Merged from MOODLE_19_STABLE
This commit is contained in:
parent
93c61c18cf
commit
b60fd03245
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user