From: skodak Date: Wed, 27 Sep 2006 20:43:04 +0000 (+0000) Subject: fixed validation of course category for site course MDL-6715 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1cd3eba948664d88519341fe799984631b028eb7;p=moodle.git fixed validation of course category for site course MDL-6715 --- diff --git a/lib/accesslib.php b/lib/accesslib.php index d9187825d8..16e625d589 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -1182,6 +1182,9 @@ function validate_context($contextlevel, $instanceid) { return (boolean)count_records('user', 'id', $instanceid); case CONTEXT_COURSECAT: + if ($instanceid == 0) { + return true; // site course category + } return (boolean)count_records('course_categories', 'id', $instanceid); case CONTEXT_COURSE: