mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-70801 core_my: Add a new courses page
This commit is contained in:
parent
c69c33b14d
commit
6ca9c2154a
33 changed files with 417 additions and 51 deletions
|
@ -249,7 +249,7 @@ class block_base {
|
|||
$this->arialabel = $bc->arialabel;
|
||||
}
|
||||
|
||||
if ($this->page->user_is_editing()) {
|
||||
if ($this->page->user_is_editing() && $this->instance_can_be_edited()) {
|
||||
$bc->controls = $this->page->blocks->edit_controls($this);
|
||||
} else {
|
||||
// we must not use is_empty on hidden blocks
|
||||
|
@ -692,6 +692,15 @@ class block_base {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* If overridden and set to false by the block it will not be editable.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function instance_can_be_edited() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** @callback callback functions for comments api */
|
||||
public static function comment_template($options) {
|
||||
$ret = <<<EOD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue