Proyectos de Subversion Moodle

Rev

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

Rev 1296 Rev 1297
Línea 433... Línea 433...
433
 
433
 
Línea 434... Línea 434...
434
        $blocks = $statics_blocks->renderBlocks();
434
        $blocks = $statics_blocks->renderBlocks();
435
 
435
 
-
 
436
        return $blocks;
-
 
437
    }
-
 
438
 
-
 
439
    function universe_child_course_drawer(): string
-
 
440
    {
-
 
441
        global $PAGE;
-
 
442
 
-
 
443
        // If the course index is explicitly set and if it should be hidden.
-
 
444
        if ($PAGE->get_show_course_index() === false) {
-
 
445
            return '';
-
 
446
        }
-
 
447
 
-
 
448
        // Only add course index on non-site course pages.
-
 
449
        if (!$PAGE->course || $PAGE->course->id == SITEID) {
-
 
450
            return '';
-
 
451
        }
-
 
452
 
-
 
453
        // Show course index to users can access the course only.
-
 
454
        if (!can_access_course($PAGE->course, null, '', true)) {
-
 
455
            return '';
-
 
456
        }
-
 
457
 
-
 
458
        $format = course_get_format($PAGE->course);
-
 
459
        $renderer = $format->get_renderer($PAGE);
-
 
460
        if (method_exists($renderer, 'course_index_drawer')) {
-
 
461
            return $this->render_from_template('theme_universe_child/courseindex/drawer', []);
-
 
462
        }
-
 
463
 
436
        return $blocks;
464
        return '';