From e9c82dca8ff5261f5d7e3a6f7b70d0e1d5a7d430 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 2 Oct 2006 08:57:00 +0000 Subject: [PATCH] Fixed capability soring on course and coursecat override MDL-6780 --- lib/accesslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index a9a241889c..c1567fb876 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -2124,7 +2124,7 @@ function fetch_context_capabilities($context) { /// the rest of code is a bit hacky, think twice before modifying it :-( // special sorting of core system capabiltites and enrollments - if ($context->contextlevel == CONTEXT_SYSTEM) { + if (in_array($context->contextlevel, array(CONTEXT_SYSTEM, CONTEXT_COURSECAT, CONTEXT_COURSE))) { $first = array(); foreach ($records as $key=>$record) { if (preg_match('|^moodle/|', $record->name) and $record->contextlevel == CONTEXT_SYSTEM) { -- 2.39.5