mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
blocks MDL-19010 Slight reordering of logic to allow titles to be changed by block get_contents (credit to tim)
This commit is contained in:
parent
2c78f462ed
commit
e54f4a78cc
1 changed files with 9 additions and 9 deletions
|
@ -356,6 +356,15 @@ class block_base {
|
||||||
$bc->blockinstanceid = $this->instance->id;
|
$bc->blockinstanceid = $this->instance->id;
|
||||||
$bc->blockpositionid = $this->instance->blockpositionid;
|
$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();
|
$attributes = $this->html_attributes();
|
||||||
if (isset($attributes['id'])) {
|
if (isset($attributes['id'])) {
|
||||||
$bc->id = $attributes['id'];
|
$bc->id = $attributes['id'];
|
||||||
|
@ -371,15 +380,6 @@ class block_base {
|
||||||
$bc->title = $this->title;
|
$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()) {
|
if ($this->page->user_is_editing()) {
|
||||||
$bc->controls = $this->page->blocks->edit_controls($this);
|
$bc->controls = $this->page->blocks->edit_controls($this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue