Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

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