var $content_type = BLOCK_TYPE_LIST;
function is_empty() {
+
+ $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
+
+ if ( !has_capability('moodle/block:view', $context) ) {
+ return true;
+ }
+
$this->get_content();
return (empty($this->content->items) && empty($this->content->footer));
}
'contextlevel' => CONTEXT_BLOCK,
'legacy' => array(
'guest' => CAP_ALLOW,
- 'user' => CAP_ALLOW
+ 'user' => CAP_ALLOW,
+ 'student' => CAP_ALLOW,
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'coursecreator' => CAP_ALLOW
)
)
);