mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-42806 block_mentees: can only be docked if it has a valid title set.
This commit is contained in:
parent
9b22eeff5d
commit
9bbcadb228
@ -46,5 +46,14 @@ class block_mentees extends block_base {
|
||||
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the block can be docked.
|
||||
* The mentees block can only be docked if it has a non-empty title.
|
||||
* @return bool
|
||||
*/
|
||||
public function instance_can_be_docked() {
|
||||
return parent::instance_can_be_docked() && isset($this->config->title) && !empty($this->config->title);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user