Permalink
Browse files

MDL-17694: very small stickyblocks improvements

  • Loading branch information...
mjollnir_
mjollnir_ committed Dec 19, 2008
1 parent c165e74 commit f3d3aa6881bb096d076543157d796a3f734ad81c
Showing with 7 additions and 1 deletion.
  1. +6 −0 blocks/admin/block_admin.php
  2. +1 −1 lib/blocklib.php
@@ -19,6 +19,12 @@ function get_content() {
$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) {
View
@@ -362,7 +362,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);
}

0 comments on commit f3d3aa6

Please sign in to comment.