mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-11814 use system context for pinned blocks; merged from MOODLE_19_STABLE
This commit is contained in:
parent
baae1acfef
commit
5c10879f55
4 changed files with 41 additions and 10 deletions
|
@ -96,7 +96,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
|
||||
if (empty($this->instance->pinned)) {
|
||||
$context = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
|
||||
} else {
|
||||
$context = get_context_instance(CONTEXT_SYSTEM); // pinned blocks do not have own context
|
||||
}
|
||||
|
||||
if (has_capability('block/rss_client:createsharedfeeds', $context)
|
||||
|| has_capability('block/rss_client:createprivatefeeds', $context)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue