mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-17458 fixing installation regressions - can not edit new admin properly
This commit is contained in:
parent
c3d0e1492e
commit
29750da13d
@ -16,7 +16,11 @@
|
||||
if (!$course = $DB->get_record('course', array('id'=>$course))) {
|
||||
print_error('invalidcourseid');
|
||||
}
|
||||
require_login($course->id);
|
||||
if (!empty($USER->newadminuser)) {
|
||||
$PAGE->set_course($SITE);
|
||||
} else {
|
||||
require_login($course);
|
||||
}
|
||||
|
||||
if ($course->id == SITEID) {
|
||||
$coursecontext = get_context_instance(CONTEXT_SYSTEM); // SYSTEM context
|
||||
|
Loading…
x
Reference in New Issue
Block a user