Proyectos de Subversion Moodle

Rev

Rev 177 | Rev 179 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
177 ariadna 1
<?php
2
require_once(__DIR__ . '/cesa.php');
178 ariadna 3
require_once($CFG->dirroot . '/course/renderer.php');
177 ariadna 4
 
5
 
6
require_login();
7
 
8
global $PAGE;
9
$PAGE->set_context(context_system::instance());
10
 
11
class StaticsBlocks extends Cesa
12
{
13
 
14
    public function __construct()
15
    {
16
        parent::__construct('statics_blocks', 'comments', 'side-pre');
17
        parent::__construct('statics_blocks', 'messageteacher', 'side-pre');
18
    }
19
 
20
    public function render()
21
    {
22
        global $PAGE, $CFG, $OUTPUT;
23
 
178 ariadna 24
        $PAGE->set_url('/cesa/statics_blocks.php', array('userid' => $this->userID));
177 ariadna 25
        $this->addRegion();
26
 
27
 
28
        $this->blockManager->load_blocks(true);
29
 
30
 
31
 
32
        $this->validateIfExistBlock();
33
        $this->redirectIfNotExistBlock('courses');
34
 
35
        $view = $OUTPUT->header();
36
        //$view .= $OUTPUT->blocks_for_region($this->regionName);
37
        $view .= $OUTPUT->footer();
38
 
39
        return $view;
40
    }
41
}
42
 
43
$statics_blocks = new StaticsBlocks();
44
echo $statics_blocks->render();