timeline: if a section is set to hidden and the user is not capable of editing a...
[moodle-blog-course-format.git] / blocks / recent_activity / block_recent_activity.php
blob4e326ff3e5f158a39f0c9ca9dbdb73776a7a2d73
1 <?PHP //$Id$
3 class block_recent_activity extends block_base {
4 function init() {
5 $this->title = get_string('recentactivity');
6 $this->version = 2007101509;
9 function get_content() {
10 global $COURSE;
12 if ($this->content !== NULL) {
13 return $this->content;
16 if (empty($this->instance)) {
17 $this->content = '';
18 return $this->content;
21 $this->content = new stdClass;
22 $this->content->text = '';
23 $this->content->footer = '';
25 // Slightly hacky way to do it but...
26 ob_start();
27 print_recent_activity($COURSE);
28 $this->content->text = ob_get_contents();
29 ob_end_clean();
31 return $this->content;
34 function applicable_formats() {
35 return array('all' => true, 'my' => false, 'tag' => false);