MDL-17458 fixing installation regressions - can not edit new admin properly

This commit is contained in:
skodak 2009-06-07 09:40:27 +00:00
parent c3d0e1492e
commit 29750da13d

View File

@ -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