How to find out the HTML generated by the line echo $ OUTPUT-course_content_header ();

0

I am modifying a moodle theme, but I can not find some HTML files or at least understand how they are created via backend, I have the following code:

<?php
            echo $OUTPUT->course_content_header();
            echo $OUTPUT->main_content();
            echo $OUTPUT->course_content_footer();
?>

I need to add an element inside the html that one of these lines of code generates, how do I find out in moodle how it generates that html and how to add that component to where I want it.

I want to add an HTML component inside the block Visão Geral dos Cursos , just above the text Nenhuma informação disponível sobre o curso

    
asked by anonymous 18.02.2016 / 17:31

1 answer

2

Type the following code: var_dump($OUTPUT->course_content_header()); die; to see the output of the $ OUTPUT collection.

The content of the above method follows:

public function course_content_header($onlyifnotcalledbefore = false) { global $CFG; if ($this->page->course->id == SITEID) { // return immediately and do not include /course/lib.php if not necessary return ''; } static $functioncalled = false; if ($functioncalled && $onlyifnotcalledbefore) { // we have already output the content header return ''; } require_once($CFG->dirroot.'/course/lib.php'); $functioncalled = true; $courseformat = course_get_format($this->page->course); if (($obj = $courseformat->course_content_header()) !== null) { return html_writer::div($courseformat->get_renderer($this->page)->render($obj), 'course-content-header'); } return ''; }

    
03.05.2016 / 17:58