/** * Outputs a heading * * @param string $text The text of the heading * @param int $level The level of importance of the heading. Defaulting to 2 * @param string $classes A space-separated list of CSS classes. Defaulting to null * @param string $id An optional ID * @return string the HTML to output. */ public function heading($text, $level = 2, $classes = null, $id = null) { $heading = parent::heading($text, $level, $classes, $id); if ($level == 2 && $this->page->pagelayout == 'incourse' && is_object($this->page->cm)) { static $called = false; if (!$called) { $markup = html_writer::start_tag('div', array('class' => 'row-fluid')); $markup .= html_writer::start_tag('div', array('class' => 'span8')); $markup .= $heading; $markup .= html_writer::end_tag('div'); $markup .= html_writer::start_tag('div', array('class' => 'span4 heading-rts')); $markup .= $this->return_to_section(); $markup .= html_writer::end_tag('div'); $markup .= html_writer::end_tag('div'); $called = true; return $markup; } } return $heading; }