Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
qbank_editquestion\output\add_new_question Class Reference

Create new question button. More...

Inheritance diagram for qbank_editquestion\output\add_new_question:

Public Member Functions

 __construct (int $categoryid, array $params, bool $canadd)
 Store data for building the template context.
 
 export_for_template (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template.
 

Protected Attributes

bool bool $canadd
 $canadd True if the add question button should be displayed.
 
int int $categoryid
 $categoryid The ID of the category the quesiton will be added to.
 
array array $params
 $params URL parameters to pass to the add question form.
 

Detailed Description

Create new question button.

Author
Mark Johnson mark..nosp@m.john.nosp@m.son@c.nosp@m.atal.nosp@m.yst-e.nosp@m.u.ne.nosp@m.t
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

qbank_editquestion\output\add_new_question::__construct ( int $categoryid,
array $params,
bool $canadd )

Store data for building the template context.

Parameters
int$categoryid
array$params
bool$canadd

Member Function Documentation

◆ export_for_template()

qbank_editquestion\output\add_new_question::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.

Member Data Documentation

◆ $canadd

bool bool qbank_editquestion\output\add_new_question::$canadd
protected

$canadd True if the add question button should be displayed.

If false, a placeholder will be shown.


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