Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_quiz\output\overrides_actions Class Reference
Inheritance diagram for mod_quiz\output\overrides_actions:
renderable templatable

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.
 

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: