diff --git a/lib/setup.php b/lib/setup.php index 32f04078b6b..120bf33e7a9 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -225,14 +225,17 @@ global $HTTPSPAGEREQUIRED; * If $SITE global from {@link get_site()} is set then SITEID to $SITE->id, otherwise set to 1. */ define('SITEID', $SITE->id); + /// And the 'default' course + $COURSE = clone($SITE); // For now. This will usually get reset later in require_login() etc. } else { /** * @ignore */ define('SITEID', 1); + /// And the 'default' course + $COURSE = new object; // no site created yet + $COURSE->id = 1; } -/// And the 'default' course - $COURSE = clone($SITE); // For now. This will usually get reset later in require_login() etc. /// Set a default enrolment configuration (see bug 1598)