Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Renderer for outputting the topics course format.

Copyright: 2012 Dan Poltawski
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 174 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

format_topics_renderer:: (7 methods):
  __construct()
  start_section_list()
  end_section_list()
  page_title()
  section_title()
  section_title_without_link()
  section_edit_control_items()


Class: format_topics_renderer  - X-Ref

Basic renderer for topics format.

__construct(moodle_page $page, $target)   X-Ref
Constructor method, calls the parent constructor.

param: moodle_page $page
param: string $target one of rendering target constants

start_section_list()   X-Ref
Generate the starting container html for a list of sections.

return: string HTML to output.

end_section_list()   X-Ref
Generate the closing container html for a list of sections.

return: string HTML to output.

page_title()   X-Ref
Generate the title for this section page.

return: string the page title

section_title($section, $course)   X-Ref
Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.

param: section_info|stdClass $section The course_section entry from DB
param: stdClass $course The course entry from DB
return: string HTML to output.

section_title_without_link($section, $course)   X-Ref
Generate the section title to be displayed on the section page, without a link.

param: section_info|stdClass $section The course_section entry from DB
param: int|stdClass $course The course entry from DB
return: string HTML to output.

section_edit_control_items($course, $section, $onsectionpage = false)   X-Ref
Generate the edit control items of a section.

param: int|stdClass $course The course entry from DB
param: section_info|stdClass $section The course_section entry from DB
param: bool $onsectionpage true if being printed on a section page
return: array of edit control items