From e54f4a78ccc9fe09ed54cf6d5298ea25e5afe414 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 31 Jul 2009 04:17:09 +0000 Subject: [PATCH] blocks MDL-19010 Slight reordering of logic to allow titles to be changed by block get_contents (credit to tim) --- blocks/moodleblock.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index 5d87a7cc7c..71531ef74a 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -356,6 +356,15 @@ class block_base { $bc->blockinstanceid = $this->instance->id; $bc->blockpositionid = $this->instance->blockpositionid; + if ($this->instance->visible) { + $bc->content = $this->formatted_contents($output); + if (!empty($this->content->footer)) { + $bc->footer = $this->content->footer; + } + } else { + $bc->add_class('invisible'); + } + $attributes = $this->html_attributes(); if (isset($attributes['id'])) { $bc->id = $attributes['id']; @@ -371,15 +380,6 @@ class block_base { $bc->title = $this->title; } - if ($this->instance->visible) { - $bc->content = $this->formatted_contents($output); - if (!empty($this->content->footer)) { - $bc->footer = $this->content->footer; - } - } else { - $bc->add_class('invisible'); - } - if ($this->page->user_is_editing()) { $bc->controls = $this->page->blocks->edit_controls($this); } -- 2.39.5