Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
mod_quiz\output\overrides_actions Class Reference

Render overrides action in the quiz secondary navigation. More...

Inheritance diagram for mod_quiz\output\overrides_actions:

Public Member Functions

 __construct (int $cmid, string $mode, bool $canedit, bool $addenabled)
 overrides_action constructor.
 
 create_add_button (\renderer_base $output)
 Create the add override button.
 
 export_for_template (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template.
 

Detailed Description

Render overrides action in the quiz secondary navigation.

The user/group overrides are now handled in the secondary navigation. This class provides the data for the templates to handle the data for overrides tab.

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

Constructor & Destructor Documentation

◆ __construct()

mod_quiz\output\overrides_actions::__construct ( int $cmid,
string $mode,
bool $canedit,
bool $addenabled )

overrides_action constructor.

Parameters
int$cmidThe course module id.
string$modeThe mode passed for the overrides url.
bool$caneditDoes the user have capabilities to list overrides.
bool$addenabledWhether the add button should be enabled or disabled.

Member Function Documentation

◆ create_add_button()

mod_quiz\output\overrides_actions::create_add_button ( \renderer_base $output)

Create the add override button.

Parameters
renderer_base$outputan instance of the quiz renderer.
Return values
single_buttonthe button, ready to reander.

◆ export_for_template()

mod_quiz\output\overrides_actions::export_for_template ( renderer_base $output)

Function to export the renderer data in a format that is suitable for a mustache template.

This means:

  1. No complex types - only stdClass, array, int, string, float, bool
  2. Any additional info that is required for the template is pre-calculated (e.g. capability checks).
Parameters
renderer_base$outputUsed to do a final render of any components that need to be rendered for export.
Return values
stdClass|array

Implements templatable.


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