"MDL-14460, fix get_context_instance, merged from MOODLE_19_STABLE"

This commit is contained in:
dongsheng 2008-05-01 06:07:24 +00:00
parent 2cb5f03a66
commit 12d0687748
8 changed files with 23 additions and 23 deletions

View file

@ -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));