Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
 
4
defined('MOODLE_INTERNAL') || die();
5
 
6
 
7
 
8
class block_cesa_lastcourse extends block_base {
9
    public function init() {
10
        $this->title = get_string('pluginname', 'block_cesa_lastcourse');
11
    }
12
 
13
    // if you have a settings.php file
14
    public function has_config()
15
    {
16
        return false;
17
    }
18
 
19
    public function hide_header()
20
    {
21
        return true;
22
    }
23
 
24
    public function instance_allow_multiple()
25
    {
26
        return false;
27
    }
28
 
29
    public function get_content() {
30
 
31
        if (isset($this->content)) {
32
            return $this->content;
33
        } else {
34
            $this->content = new \stdClass();
35
        }
36
 
37
 
38
        $renderer = $this->page->get_renderer('block_cesa_lastcourse');
39
        $this->content = new stdClass();
40
        $this->content->text = $renderer->procesar();
41
        return $this->content;
42
 
43
 
44
 
45
    }
46
}