mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Fixed capability soring on course and coursecat override MDL-6780
This commit is contained in:
parent
8020a0162f
commit
e9c82dca8f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user