Proyectos de Subversion Moodle

Rev

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

<?php
defined('MOODLE_INTERNAL') || die();

class block_cesa_lastcourse extends block_base
{
    public function init()
    {
        $this->title = get_string('pluginname', 'block_cesa_lastcourse');
    }

    // if you have a settings.php file
    public function has_config()
    {
        return false;
    }

    public function hide_header()
    {
        return true;
    }

    public function instance_allow_multiple()
    {
        return false;
    }

    public function get_content()
    {
        if (isset($this->content)) {
            return $this->content;
        } else {
            $this->content = new \stdClass();
        }

        $renderer = $this->page->get_renderer('block_cesa_lastcourse');
        $this->content = new stdClass();
        $this->content->text = $renderer->procesar();
        return $this->content;
    }
}