]> git.mjollnir.org Git - moodle.git/commitdiff
blocks MDL-19010 Slight reordering of logic to allow titles to be changed by block...
authormoodler <moodler>
Fri, 31 Jul 2009 04:17:09 +0000 (04:17 +0000)
committermoodler <moodler>
Fri, 31 Jul 2009 04:17:09 +0000 (04:17 +0000)
blocks/moodleblock.class.php

index 5d87a7cc7c93fa99970777895cd1cc217d2743dc..71531ef74aa191accb987c3bdec8ed07cd689a08 100644 (file)
@@ -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);
         }