Proyectos de Subversion Moodle

Rev

Rev 1293 | Rev 1295 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1293 Rev 1294
Línea 70... Línea 70...
70
 
70
 
Línea 71... Línea 71...
71
        $blocks = $statics_blocks->renderBlocks();
71
        $blocks = $statics_blocks->renderBlocks();
72
 
72
 
-
 
73
        return $blocks;
-
 
74
    }
-
 
75
 
-
 
76
    function universe_child_course_drawer(): string
-
 
77
    {
-
 
78
        global $PAGE;
-
 
79
 
-
 
80
        // If the course index is explicitly set and if it should be hidden.
-
 
81
        if ($PAGE->get_show_course_index() === false) {
-
 
82
            return '';
-
 
83
        }
-
 
84
 
-
 
85
        // Only add course index on non-site course pages.
-
 
86
        if (!$PAGE->course || $PAGE->course->id == SITEID) {
-
 
87
            return '';
-
 
88
        }
-
 
89
 
-
 
90
        // Show course index to users can access the course only.
-
 
91
        if (!can_access_course($PAGE->course, null, '', true)) {
-
 
92
            return '';
-
 
93
        }
-
 
94
 
-
 
95
        $format = course_get_format($PAGE->course);
-
 
96
        $renderer = $format->get_renderer($PAGE);
-
 
97
        if (method_exists($renderer, 'course_index_drawer')) {
-
 
98
            return $this->render_from_template('theme_universe_child/courseindex/drawer', []);
-
 
99
        }
-
 
100
 
73
        return $blocks;
101
        return '';