Proyectos de Subversion Moodle

Rev

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

Rev 1299 Rev 1300
Línea 2225... Línea 2225...
2225
 
2225
 
Línea 2226... Línea 2226...
2226
        $blocks = $statics_blocks->renderBlocks();
2226
        $blocks = $statics_blocks->renderBlocks();
2227
 
2227
 
-
 
2228
        return $blocks;
-
 
2229
    }
-
 
2230
 
-
 
2231
    function universe_child_course_drawer(): string
-
 
2232
    {
-
 
2233
        global $PAGE;
-
 
2234
 
-
 
2235
        // If the course index is explicitly set and if it should be hidden.
-
 
2236
        if ($PAGE->get_show_course_index() === false) {
-
 
2237
            return '';
-
 
2238
        }
-
 
2239
 
-
 
2240
        // Only add course index on non-site course pages.
-
 
2241
        if (!$PAGE->course || $PAGE->course->id == SITEID) {
-
 
2242
            return '';
-
 
2243
        }
-
 
2244
 
-
 
2245
        // Show course index to users can access the course only.
-
 
2246
        if (!can_access_course($PAGE->course, null, '', true)) {
-
 
2247
            return '';
-
 
2248
        }
-
 
2249
 
-
 
2250
        $format = course_get_format($PAGE->course);
-
 
2251
        $renderer = $format->get_renderer($PAGE);
-
 
2252
        if (method_exists($renderer, 'course_index_drawer')) {
-
 
2253
            return $this->render_from_template('theme_universe_child/courseindex/drawer', []);
-
 
2254
        }
-
 
2255
 
2228
        return $blocks;
2256
        return '';