Merge branch 'MDL-68084-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2020-05-15 01:30:52 +02:00
+5
View File
@@ -221,6 +221,11 @@ class block_base {
public function get_content_for_output($output) {
global $CFG;
// We can exit early if the current user doesn't have the capability to view the block.
if (!has_capability('moodle/block:view', $this->context)) {
return null;
}
$bc = new block_contents($this->html_attributes());
$bc->attributes['data-block'] = $this->name();
$bc->blockinstanceid = $this->instance->id;