mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
"MDL-14460, fix get_context_instance, merged from MOODLE_19_STABLE"
This commit is contained in:
parent
2cb5f03a66
commit
12d0687748
8 changed files with 23 additions and 23 deletions
|
@ -12,7 +12,7 @@ class page_my_moodle extends page_base {
|
|||
page_id_and_class($id,$class);
|
||||
if ($id == PAGE_MY_MOODLE) {
|
||||
return true;
|
||||
} else if (has_capability('moodle/my:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID)) && defined('ADMIN_STICKYBLOCKS')) {
|
||||
} else if (has_capability('moodle/my:manageblocks', get_context_instance(CONTEXT_SYSTEM)) && defined('ADMIN_STICKYBLOCKS')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -20,7 +20,7 @@ class page_my_moodle extends page_base {
|
|||
|
||||
function user_is_editing() {
|
||||
global $USER;
|
||||
if (has_capability('moodle/my:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID)) && defined('ADMIN_STICKYBLOCKS')) {
|
||||
if (has_capability('moodle/my:manageblocks', get_context_instance(CONTEXT_SYSTEM)) && defined('ADMIN_STICKYBLOCKS')) {
|
||||
return true;
|
||||
}
|
||||
return (!empty($USER->editing));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue