From: toyomoyo Date: Thu, 19 Oct 2006 06:16:35 +0000 (+0000) Subject: merged, making the site context and site course context the same X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b7cec865f488db8cda3cc7baa43362177ee754eb;p=moodle.git merged, making the site context and site course context the same --- diff --git a/lib/accesslib.php b/lib/accesslib.php index 637e933857..132cda8af2 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -1268,6 +1268,11 @@ function get_context_instance($contextlevel=NULL, $instance=SITEID) { global $context_cache, $context_cache_id, $CONTEXT; static $allowed_contexts = array(CONTEXT_SYSTEM, CONTEXT_PERSONAL, CONTEXT_USER, CONTEXT_COURSECAT, CONTEXT_COURSE, CONTEXT_GROUP, CONTEXT_MODULE, CONTEXT_BLOCK); + // This is really a systen context + if ($contextlevel == CONTEXT_COURSE && $instance == SITEID) { + $contextlevel = CONTEXT_SYSTEM; + } + /// If no level is supplied then return the current global context if there is one if (empty($contextlevel)) { if (empty($CONTEXT)) {