MDL-8537 Added $CFG as the object to check for enrol method when the course is being...
[moodle-pu.git] / blocks / recent_activity / block_recent_activity.php
blob06516b359c9413864bb2403ea975d5f79ab88527
1 <?PHP //$Id$
3 class block_recent_activity extends block_base {
4 function init() {
5 $this->title = get_string('recentactivity');
6 $this->version = 2004042900;
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);