MDL-22054 fixed get_string typo
[moodle.git] / blocks / recent_activity / block_recent_activity.php
1 <?php
3 class block_recent_activity extends block_base {
4     function init() {
5         $this->title = get_string('pluginname', 'block_recent_activity');
6         $this->version = 2007101509;
7     }
9     function get_content() {
10         if ($this->content !== NULL) {
11             return $this->content;
12         }
14         if (empty($this->instance)) {
15             $this->content = '';
16             return $this->content;
17         }
19         $this->content = new stdClass;
20         $this->content->text = '';
21         $this->content->footer = '';
23         // Slightly hacky way to do it but...
24         ob_start();
25         print_recent_activity($this->page->course);
26         $this->content->text = ob_get_contents();
27         ob_end_clean();
29         return $this->content;
30     }
32     function applicable_formats() {
33         return array('all' => true, 'my' => false, 'tag' => false);
34     }
35 }