From b7cec865f488db8cda3cc7baa43362177ee754eb Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Thu, 19 Oct 2006 06:16:35 +0000 Subject: [PATCH] merged, making the site context and site course context the same --- lib/accesslib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/accesslib.php b/lib/accesslib.php index 637e9338576..132cda8af2a 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)) {