Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
quiz_nav_panel_base Class Reference

Represents the navigation panel, and builds a block_contents to allow it to be output. More...

Inheritance diagram for quiz_nav_panel_base:
quiz_attempt_nav_panel quiz_review_nav_panel

Public Member Functions

 __construct (quiz_attempt $attemptobj, question_display_options $options, $page, $showall)
 
 get_button_container_class ()
 Return 'allquestionsononepage' as CSS class name when $showall is set, otherwise, return 'multipages' as CSS class name. More...
 
 get_question_buttons ()
 Get the buttons and section headings to go in the quiz navigation block. More...
 
 render_before_button_bits (mod_quiz_renderer $output)
 Hook for subclasses to override. More...
 
 render_end_bits (mod_quiz_renderer $output)
 
 user_picture ()
 

Protected Member Functions

 get_question_url ($slot)
 
 get_state_string (question_attempt $qa, $showcorrectness)
 
 render_restart_preview_link ($output)
 Render the restart preview button. More...
 

Protected Attributes

quiz_attempt $attemptobj
 
question_display_options $options
 
integer $page
 
boolean $showall
 

Detailed Description

Represents the navigation panel, and builds a block_contents to allow it to be output.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 2.0

Member Function Documentation

◆ get_button_container_class()

quiz_nav_panel_base::get_button_container_class ( )

Return 'allquestionsononepage' as CSS class name when $showall is set, otherwise, return 'multipages' as CSS class name.

Return values
string,CSSclass name

◆ get_question_buttons()

quiz_nav_panel_base::get_question_buttons ( )

Get the buttons and section headings to go in the quiz navigation block.

Return values
renderable[]the buttons, possibly interleaved with section headings.

◆ render_before_button_bits()

quiz_nav_panel_base::render_before_button_bits ( mod_quiz_renderer  $output)

Hook for subclasses to override.

Parameters
mod_quiz_renderer$outputthe quiz renderer to use.
Return values
stringHTML to output.

Reimplemented in quiz_attempt_nav_panel.

◆ render_restart_preview_link()

quiz_nav_panel_base::render_restart_preview_link (   $output)
protected

Render the restart preview button.

Parameters
mod_quiz_renderer$outputthe quiz renderer to use.
Return values
stringHTML to output.

The documentation for this class was generated from the following file: