MDL-17694: very small stickyblocks improvements (Merged from MOODLE_19_STABLE)
This commit is contained in:
@@ -19,6 +19,12 @@ class block_admin extends block_list {
|
||||
$this->content->icons = array();
|
||||
$this->content->footer = '';
|
||||
|
||||
if (empty($this->instance->pageid)) { // sticky
|
||||
if (!empty($COURSE)) {
|
||||
$this->instance->pageid = $COURSE->id;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->instance)) {
|
||||
return $this->content = '';
|
||||
} else if ($this->instance->pageid == SITEID) {
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ function blocks_print_group(&$page, &$pageblocks, $position) {
|
||||
|
||||
if ($page->blocks_default_position() == $position &&
|
||||
$page->user_is_editing() &&
|
||||
($managecourseblocks || $editmymoodle || $myownblogpage)) {
|
||||
($managecourseblocks || $editmymoodle || $myownblogpage || defined('ADMIN_STICKYBLOCKS'))) {
|
||||
|
||||
blocks_print_adminblock($page, $pageblocks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user