Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

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