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.

(no description)

File Size: 201 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: navigation_panel_base  - X-Ref

Represents the navigation panel, and builds a {@see block_contents} to allow it to be output.

This class is not currently renderable or templatable, but it probably should be in the future,
which is why it is already in the output namespace.

__construct(quiz_attempt $attemptobj,question_display_options $options, $page, $showall)   X-Ref
Constructor.

param: quiz_attempt $attemptobj construct the panel for this attempt.
param: question_display_options $options display options in force.
param: int $page which page of the quiz attempt is being shown, -1 if all.
param: bool $showall whether all pages are being shown at once.

get_question_buttons()   X-Ref
Get the buttons and section headings to go in the quiz navigation block.

return: renderable[] the buttons, possibly interleaved with section headings.

get_state_string(question_attempt $qa, $showcorrectness)   X-Ref
Get the human-readable description of the current state of a particular question.

param: question_attempt $qa the attempt at the question of interest.
param: bool $showcorrectness whether the current use is allowed to see if they have got the question right.
return: string Human-readable description of the state.

render_before_button_bits(renderer $output)   X-Ref
Hook for subclasses to override to do output above the question buttons.

param: renderer $output the quiz renderer to use.
return: string HTML to output.

render_restart_preview_link($output)   X-Ref
Render the restart preview button.

param: renderer $output the quiz renderer to use.
return: string HTML to output.

user_picture()   X-Ref
Get the user picture which should be displayed, if required.

return: user_picture|null

get_button_container_class()   X-Ref
Return 'allquestionsononepage' as CSS class name when $showall is set,
otherwise, return 'multipages' as CSS class name.

return: string, CSS class name