Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_2...
[moodle.git] / blocks / recent_activity / block_recent_activity.php
blob83b146afff750e57060df5604bb3a68364a9bb01
1 <?php
3 require_once($CFG->dirroot.'/course/lib.php');
5 class block_recent_activity extends block_base {
6 function init() {
7 $this->title = get_string('pluginname', 'block_recent_activity');
10 function get_content() {
11 if ($this->content !== NULL) {
12 return $this->content;
15 if (empty($this->instance)) {
16 $this->content = '';
17 return $this->content;
20 $this->content = new stdClass;
21 $this->content->text = '';
22 $this->content->footer = '';
24 // Slightly hacky way to do it but...
25 ob_start();
26 print_recent_activity($this->page->course);
27 $this->content->text = ob_get_contents();
28 ob_end_clean();
30 return $this->content;
33 function applicable_formats() {
34 return array('all' => true, 'my' => false, 'tag' => false);