HTML Block - header missing when title empty

HTML Block - header missing when title empty

by Marcus Hoberg -
Number of replies: 0

Hi,

We are using moodle 2.3.1 and the Solstice theme. I´m struggeling with the following issue: When introducing an HTML Block to a course where the title is empty, the header of the block is missing. In editing view, the header is there.

In addition to that, the minimise and dock buttons are missing. We already had something similar with moodle 1.9 a couple of years ago, and solved it by commenting out the function hide_header in block_html.php. But in moodle 2 the block definition looks different, and I can´t find a function hide_header.

The missing docking option seems to be in block_html.php lines 125ff:

/**
     * The block should only be dockable when the title of the block is not empty
     * and when parent allows docking.
     *
     * @return bool
     */
    public function instance_can_be_docked() {
        return (!empty($this->config->title) && parent::instance_can_be_docked());
    }

but I don´t know how to improve that.

 

Can anybody help?

 

This is a related moodle 1.9 discussion thread: http://moodle.org/mod/forum/discuss.php?d=124888

 

Best Regards, Marcus

Attachment htlm-block-title.png
Average of ratings: -