Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403]

Moodle renderer used to display special elements of the lesson module

Copyright: 2009 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 688 lines (29 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: mod_lesson_renderer  - X-Ref

header($lesson, $cm, $currenttab = '', $extraeditbuttons = false, $lessonpageid = null, $extrapagetitle = null)   X-Ref
Returns the header for the lesson module

param: lesson $lesson a lesson object.
param: string $currenttab current tab that is shown.
param: bool   $extraeditbuttons if extra edit buttons should be displayed.
param: int    $lessonpageid id of the lesson page that needs to be displayed.
param: string $extrapagetitle String to appent to the page title.
return: string

footer()   X-Ref
Returns the footer

return: string

lesson_inaccessible($message)   X-Ref
Returns HTML for a lesson inaccessible message

param: string $message
return: <type>

login_prompt(lesson $lesson, $failedattempt = false)   X-Ref
Returns HTML to prompt the user to log in

param: lesson $lesson
param: bool $failedattempt
return: string

dependancy_errors($dependentlesson, $errors)   X-Ref
Returns HTML to display dependancy errors

param: object $dependentlesson
param: array $errors
return: string

message($message, single_button $button = null)   X-Ref
Returns HTML to display a message

param: string $message
param: single_button $button
return: string

continue_links(lesson $lesson, $lastpageseenid)   X-Ref
Returns HTML to display a continue button

param: lesson $lesson
param: int $lastpageseen
return: string

display_page(lesson $lesson, lesson_page $page, $attempt)   X-Ref
Returns HTML to display a page to the user

param: lesson $lesson
param: lesson_page $page
param: object $attempt
return: string

display_edit_collapsed(lesson $lesson, $pageid)   X-Ref
Returns HTML to display a collapsed edit form

param: lesson $lesson
param: int $pageid
return: string

display_edit_full(lesson $lesson, $pageid, $prevpageid, $single=false)   X-Ref
Returns HTML to display the full edit page

param: lesson $lesson
param: int $pageid
param: int $prevpageid
param: bool $single
return: string

add_page_links(lesson $lesson, $prevpageid=false)   X-Ref
Returns HTML to display the add page links

param: lesson $lesson
param: int $prevpageid
return: string

add_first_page_links(lesson $lesson)   X-Ref
Return HTML to display add first page links

param: lesson $lesson
return: string

page_action_links(lesson_page $page, $printmove, $printaddpage=false)   X-Ref
Returns HTML to display action links for a page

param: lesson_page $page
param: bool $printmove
param: bool $printaddpage
return: string

ongoing_score(lesson $lesson)   X-Ref
Prints the on going message to the user.

With custom grading On, displays points
earned out of total points possible thus far.
With custom grading Off, displays number of correct
answers out of total attempted.

param: lesson $lesson
return: string

progress_bar(lesson $lesson, $progress = null)   X-Ref
Returns HTML to display a progress bar of progression through a lesson

param: lesson $lesson
param: int $progress optional, if empty it will be calculated
return: string

slideshow_start(lesson $lesson)   X-Ref
Returns HTML to show the start of a slideshow

param: lesson $lesson

slideshow_end()   X-Ref
Returns HTML to show the end of a slideshow


paragraph($contents, $class='')   X-Ref
Returns a P tag containing contents

param: string $contents
param: string $class

display_eol_page(lesson $lesson, $data)   X-Ref
Returns the HTML for displaying the end of lesson page.

param: lesson $lesson lesson instance
param: stdclass $data lesson data to be rendered
return: string         HTML contents

render_override_action_menu(\mod_lesson\output\override_action_menu $overrideactionmenu)   X-Ref
Render the override action menu.

param: \mod_lesson\output\override_action_menu $overrideactionmenu The overrideactionmenu
return: string The rendered override action menu.

render_edit_action_buttons(\mod_lesson\output\edit_action_buttons $editbuttons)   X-Ref
Render the edit action buttons.

param: \mod_lesson\output\edit_action_buttons $editbuttons The editbuttons
return: string The rendered edit action buttons.

render_edit_action_area(\mod_lesson\output\edit_action_area $editarea)   X-Ref
Render the edit action area.

param: \mod_lesson\output\edit_action_area $editarea The edit area.
return: string The rendered edit action area.

render_report_action_menu(\mod_lesson\output\report_action_menu $reportmenu)   X-Ref
Render the report action menu

param: \mod\lesson\output\report_action_menu $reportmenu The reportmenu.
return: string The rendered report action menu.